
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>djongo.models package &#8212; djongo 1.2.24 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex/" />
    <link rel="search" title="Search" href="../search/" />
    <link rel="next" title="djongo.sql2mongo package" href="../djongo.sql2mongo/" />
    <link rel="prev" title="djongo.dynamic_formsets.templatetags package" href="../djongo.dynamic_formsets.templatetags/" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="djongo-models-package">
<h1>djongo.models package<a class="headerlink" href="#djongo-models-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-djongo.models.fields">
<span id="djongo-models-fields-module"></span><h2>djongo.models.fields module<a class="headerlink" href="#module-djongo.models.fields" title="Permalink to this headline">¶</a></h2>
<p>The standard way of using djongo is to import models.py
in place of Django’s standard models module.</p>
<p>Djongo Fields is where custom fields for working with
MongoDB is defined.</p>
<blockquote>
<div><ul class="simple">
<li>EmbeddedModelField</li>
<li>ArrayModelField</li>
<li>ArrayReferenceField</li>
<li>GenericReferenceField</li>
</ul>
</div></blockquote>
<p>These are the main fields for working with MongoDB.</p>
<dl class="class">
<dt id="djongo.models.fields.ArrayFormBoundField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ArrayFormBoundField</code><span class="sig-paren">(</span><em>form</em>, <em>field</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormBoundField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.forms.boundfield.BoundField</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ArrayFormField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ArrayFormField</code><span class="sig-paren">(</span><em>name</em>, <em>model_form_class</em>, <em>mdl_form_kw_l</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.forms.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.fields.ArrayFormField.clean">
<code class="descname">clean</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormField.clean" title="Permalink to this definition">¶</a></dt>
<dd><p>Validate the given value and return its “cleaned” value as an
appropriate Python object. Raise ValidationError for any errors.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayFormField.get_bound_field">
<code class="descname">get_bound_field</code><span class="sig-paren">(</span><em>form</em>, <em>field_name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormField.get_bound_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a BoundField instance that will be used when accessing the form
field in a template.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayFormField.has_changed">
<code class="descname">has_changed</code><span class="sig-paren">(</span><em>initial</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormField.has_changed" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if data differs from initial.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ArrayFormWidget">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ArrayFormWidget</code><span class="sig-paren">(</span><em>first_field_id</em>, <em>attrs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormWidget" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.forms.widgets.Widget</span></code></p>
<dl class="method">
<dt id="djongo.models.fields.ArrayFormWidget.id_for_label">
<code class="descname">id_for_label</code><span class="sig-paren">(</span><em>id_</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormWidget.id_for_label" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the HTML ID attribute of this Widget for use by a &lt;label&gt;,
given the ID of the field. Return None if no ID is available.</p>
<p>This hook is necessary because some widgets have multiple HTML
elements and, thus, multiple IDs. In that case, this method should
return an ID value that corresponds to the first ID in the widget’s
tags.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.ArrayFormWidget.media">
<code class="descname">media</code><a class="headerlink" href="#djongo.models.fields.ArrayFormWidget.media" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayFormWidget.render">
<code class="descname">render</code><span class="sig-paren">(</span><em>name</em>, <em>value</em>, <em>attrs=None</em>, <em>renderer=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormWidget.render" title="Permalink to this definition">¶</a></dt>
<dd><p>Render the widget as an HTML string.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayFormWidget.value_from_datadict">
<code class="descname">value_from_datadict</code><span class="sig-paren">(</span><em>data</em>, <em>files</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormWidget.value_from_datadict" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a dictionary of data and this widget’s name, return the value
of this widget or None if it’s not provided.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayFormWidget.value_omitted_from_data">
<code class="descname">value_omitted_from_data</code><span class="sig-paren">(</span><em>data</em>, <em>files</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayFormWidget.value_omitted_from_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ArrayModelField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ArrayModelField</code><span class="sig-paren">(</span><em>model_container: Type[django.db.models.base.Model], model_form_class: Type[django.forms.models.ModelForm] = None, model_form_kwargs_l: dict = None, *args, **kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayModelField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<p>Implements an array of objects inside the document.</p>
<p>The allowed object type is defined on model declaration. The
declared instance will accept a python list of instances of the
given model as its contents.</p>
<p>The model of the container must be declared as abstract, thus should
not be treated as a collection of its own.</p>
<p>Example:</p>
<dl class="docutils">
<dt>class Author(models.Model):</dt>
<dd><p class="first">name = models.CharField(max_length=100)
email = models.CharField(max_length=100)</p>
<dl class="last docutils">
<dt>class Meta:</dt>
<dd>abstract = True</dd>
</dl>
</dd>
<dt>class AuthorForm(forms.ModelForm):</dt>
<dd><dl class="first last docutils">
<dt>class Meta:</dt>
<dd><p class="first">model = Author
fields = (</p>
<blockquote>
<div>‘name’, ‘email’</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
</dd>
<dt>class MultipleBlogPosts(models.Model):</dt>
<dd><p class="first">h1 = models.CharField(max_length=100)
content = models.ArrayModelField(</p>
<blockquote>
<div>model_container=BlogContent,
model_form_class=BlogContentForm</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
<dl class="method">
<dt id="djongo.models.fields.ArrayModelField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayModelField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.ArrayModelField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.fields.ArrayModelField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayModelField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayModelField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the formfield for the array.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayModelField.from_db_value">
<code class="descname">from_db_value</code><span class="sig-paren">(</span><em>value</em>, <em>expression</em>, <em>connection</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayModelField.from_db_value" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayModelField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayModelField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayModelField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayModelField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Overrides standard to_python method from django models to allow
correct translation of Mongo array to a python list.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayModelField.validate">
<code class="descname">validate</code><span class="sig-paren">(</span><em>value</em>, <em>model_instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayModelField.validate" title="Permalink to this definition">¶</a></dt>
<dd><p>Validate value and raise ValidationError if necessary. Subclasses
should override this to provide validation logic.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ArrayReferenceDescriptor">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ArrayReferenceDescriptor</code><span class="sig-paren">(</span><em>field_with_rel</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayReferenceDescriptor" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related_descriptors.ForwardManyToOneDescriptor</span></code></p>
<dl class="attribute">
<dt id="djongo.models.fields.ArrayReferenceDescriptor.related_manager_cls">
<code class="descname">related_manager_cls</code><a class="headerlink" href="#djongo.models.fields.ArrayReferenceDescriptor.related_manager_cls" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ArrayReferenceField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ArrayReferenceField</code><span class="sig-paren">(</span><em>to</em>, <em>on_delete=None</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>parent_link=False</em>, <em>to_field=None</em>, <em>db_constraint=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related.ForeignKey</span></code></p>
<p>When the entry gets saved, only a reference to the primary_key of the model is saved in the array.
For all practical aspects, the ArrayReferenceField behaves like a Django ManyToManyField.</p>
<dl class="attribute">
<dt id="djongo.models.fields.ArrayReferenceField.forward_related_accessor_class">
<code class="descname">forward_related_accessor_class</code><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.forward_related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#djongo.models.fields.ArrayReferenceDescriptor" title="djongo.models.fields.ArrayReferenceDescriptor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ArrayReferenceDescriptor</span></code></a></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayReferenceField.get_db_prep_save">
<code class="descname">get_db_prep_save</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.get_db_prep_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for saving into a database.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ArrayReferenceField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.ArrayReferenceField.many_to_many">
<code class="descname">many_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.many_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.ArrayReferenceField.many_to_one">
<code class="descname">many_to_one</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.many_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.ArrayReferenceField.one_to_many">
<code class="descname">one_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.one_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.ArrayReferenceField.one_to_one">
<code class="descname">one_to_one</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.one_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.ArrayReferenceField.related_accessor_class">
<code class="descname">related_accessor_class</code><a class="headerlink" href="#djongo.models.fields.ArrayReferenceField.related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#djongo.models.fields.ReverseArrayReferenceDescriptor" title="djongo.models.fields.ReverseArrayReferenceDescriptor"><code class="xref py py-class docutils literal notranslate"><span class="pre">ReverseArrayReferenceDescriptor</span></code></a></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.DjongoManager">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">DjongoManager</code><a class="headerlink" href="#djongo.models.fields.DjongoManager" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.manager.Manager</span></code></p>
<p>This modified manager allows to issue Mongo functions by prefixing
them with ‘<a href="#id63"><span class="problematic" id="id64">mongo_</span></a>’.</p>
<p>This module allows methods to be passed directly to pymongo.</p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.EmbeddedFormBoundField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">EmbeddedFormBoundField</code><span class="sig-paren">(</span><em>form</em>, <em>field</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormBoundField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.forms.boundfield.BoundField</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.EmbeddedFormField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">EmbeddedFormField</code><span class="sig-paren">(</span><em>name</em>, <em>model_form_class</em>, <em>model_form_kw</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.forms.fields.MultiValueField</span></code></p>
<dl class="method">
<dt id="djongo.models.fields.EmbeddedFormField.bound_data">
<code class="descname">bound_data</code><span class="sig-paren">(</span><em>data</em>, <em>initial</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormField.bound_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the value that should be shown for this field on render of a
bound form, given the submitted POST data for the field and the initial
data, if any.</p>
<p>For most fields, this will simply be data; FileFields need to handle it
a bit differently.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedFormField.compress">
<code class="descname">compress</code><span class="sig-paren">(</span><em>clean_data_vals</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormField.compress" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a single value for the given list of values. The values can be
assumed to be valid.</p>
<p>For example, if this MultiValueField was instantiated with
fields=(DateField(), TimeField()), this might return a datetime
object created by combining the date and time in data_list.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedFormField.get_bound_field">
<code class="descname">get_bound_field</code><span class="sig-paren">(</span><em>form</em>, <em>field_name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormField.get_bound_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a BoundField instance that will be used when accessing the form
field in a template.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.EmbeddedFormWidget">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">EmbeddedFormWidget</code><span class="sig-paren">(</span><em>field_names</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormWidget" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.forms.widgets.MultiWidget</span></code></p>
<dl class="method">
<dt id="djongo.models.fields.EmbeddedFormWidget.decompress">
<code class="descname">decompress</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormWidget.decompress" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of decompressed values for the given compressed value.
The given value can be assumed to be valid, but not necessarily
non-empty.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.EmbeddedFormWidget.media">
<code class="descname">media</code><a class="headerlink" href="#djongo.models.fields.EmbeddedFormWidget.media" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedFormWidget.value_from_datadict">
<code class="descname">value_from_datadict</code><span class="sig-paren">(</span><em>data</em>, <em>files</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormWidget.value_from_datadict" title="Permalink to this definition">¶</a></dt>
<dd><p>Given a dictionary of data and this widget’s name, return the value
of this widget or None if it’s not provided.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedFormWidget.value_omitted_from_data">
<code class="descname">value_omitted_from_data</code><span class="sig-paren">(</span><em>data</em>, <em>files</em>, <em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedFormWidget.value_omitted_from_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.EmbeddedModelField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">EmbeddedModelField</code><span class="sig-paren">(</span><em>model_container: Type[django.db.models.base.Model], model_form_class: Type[django.forms.models.ModelForm] = None, model_form_kwargs: dict = None, *args, **kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<p>Allows for the inclusion of an instance of an abstract model as
a field inside a document.</p>
<p>Example:</p>
<dl class="docutils">
<dt>class Author(models.Model):</dt>
<dd><p class="first">name = models.CharField(max_length=100)
email = models.CharField(max_length=100)</p>
<dl class="last docutils">
<dt>class Meta:</dt>
<dd>abstract = True</dd>
</dl>
</dd>
<dt>class AuthorForm(forms.ModelForm):</dt>
<dd><dl class="first last docutils">
<dt>class Meta:</dt>
<dd><p class="first">model = Author
fields = (</p>
<blockquote>
<div>‘name’, ‘email’</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
</dd>
<dt>class MultipleBlogPosts(models.Model):</dt>
<dd><p class="first">h1 = models.CharField(max_length=100)
content = models.ArrayModelField(</p>
<blockquote>
<div>model_container=BlogContent,
model_form_class=BlogContentForm</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
<dl class="method">
<dt id="djongo.models.fields.EmbeddedModelField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.fields.EmbeddedModelField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedModelField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedModelField.from_db_value">
<code class="descname">from_db_value</code><span class="sig-paren">(</span><em>value</em>, <em>expression</em>, <em>connection</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField.from_db_value" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedModelField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection=None</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedModelField.pre_save">
<code class="descname">pre_save</code><span class="sig-paren">(</span><em>model_instance</em>, <em>add</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField.pre_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value just before saving.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.EmbeddedModelField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.EmbeddedModelField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Overrides Django’s default to_python to allow correct
translation to instance.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.GenericReferenceField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">GenericReferenceField</code><a class="headerlink" href="#djongo.models.fields.GenericReferenceField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.mixins.FieldCacheMixin</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ListField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ListField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ListField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<p>MongoDB allows the saving of arbitrary data inside it’s embedded array. The <cite>ListField</cite> is useful in such cases.</p>
<dl class="attribute">
<dt id="djongo.models.fields.ListField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.fields.ListField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ListField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ListField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ModelSubterfuge">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ModelSubterfuge</code><span class="sig-paren">(</span><em>embedded_model</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ModelSubterfuge" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ObjectIdField">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ObjectIdField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ObjectIdField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.AutoField</span></code></p>
<p>For every document inserted into a collection MongoDB internally creates an field.
The field can be referenced from within the Model as _id.</p>
<dl class="method">
<dt id="djongo.models.fields.ObjectIdField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ObjectIdField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ObjectIdField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ObjectIdField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.fields.ObjectIdField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ObjectIdField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.fields.ReverseArrayReferenceDescriptor">
<em class="property">class </em><code class="descclassname">djongo.models.fields.</code><code class="descname">ReverseArrayReferenceDescriptor</code><span class="sig-paren">(</span><em>rel</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.ReverseArrayReferenceDescriptor" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related_descriptors.ReverseManyToOneDescriptor</span></code></p>
<dl class="attribute">
<dt id="djongo.models.fields.ReverseArrayReferenceDescriptor.related_manager_cls">
<code class="descname">related_manager_cls</code><a class="headerlink" href="#djongo.models.fields.ReverseArrayReferenceDescriptor.related_manager_cls" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="djongo.models.fields.create_forward_array_reference_manager">
<code class="descclassname">djongo.models.fields.</code><code class="descname">create_forward_array_reference_manager</code><span class="sig-paren">(</span><em>superclass</em>, <em>rel</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.create_forward_array_reference_manager" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="djongo.models.fields.create_reverse_array_reference_manager">
<code class="descclassname">djongo.models.fields.</code><code class="descname">create_reverse_array_reference_manager</code><span class="sig-paren">(</span><em>superclass</em>, <em>rel</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.create_reverse_array_reference_manager" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="djongo.models.fields.make_mdl">
<code class="descclassname">djongo.models.fields.</code><code class="descname">make_mdl</code><span class="sig-paren">(</span><em>model</em>, <em>model_dict</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.make_mdl" title="Permalink to this definition">¶</a></dt>
<dd><p>Builds an instance of model from the model_dict.</p>
</dd></dl>

<dl class="function">
<dt id="djongo.models.fields.useful_field">
<code class="descclassname">djongo.models.fields.</code><code class="descname">useful_field</code><span class="sig-paren">(</span><em>field</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.fields.useful_field" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-djongo.models">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-djongo.models" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="djongo.models.Aggregate">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Aggregate</code><span class="sig-paren">(</span><em>*args</em>, <em>filter=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Aggregate" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Func</span></code></p>
<dl class="method">
<dt id="djongo.models.Aggregate.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>**extra_context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Aggregate.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id1"><span class="problematic" id="id2">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id65"><span class="problematic" id="id66">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id3"><span class="problematic" id="id4">``</span></a><a href="#id5"><span class="problematic" id="id6">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Aggregate.contains_aggregate">
<code class="descname">contains_aggregate</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.Aggregate.contains_aggregate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Aggregate.default_alias">
<code class="descname">default_alias</code><a class="headerlink" href="#djongo.models.Aggregate.default_alias" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Aggregate.filter_template">
<code class="descname">filter_template</code><em class="property"> = '%s FILTER (WHERE %%(filter)s)'</em><a class="headerlink" href="#djongo.models.Aggregate.filter_template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Aggregate.get_group_by_cols">
<code class="descname">get_group_by_cols</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Aggregate.get_group_by_cols" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Aggregate.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Aggregate.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Aggregate.get_source_fields">
<code class="descname">get_source_fields</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Aggregate.get_source_fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the underlying field types used by this aggregate.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Aggregate.name">
<code class="descname">name</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Aggregate.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Aggregate.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Aggregate.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide the chance to do any preprocessing or validation before being
added to the query.</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>query: the backend query implementation</li>
<li>allow_joins: boolean allowing or denying use of joins
in this query</li>
<li>reuse: a set of reusable joins for multijoins</li>
<li>summarize: a terminal aggregate clause</li>
<li>for_save: whether this expression about to be used in a save or update</li>
</ul>
</dd>
</dl>
<p>Return: an Expression to be added to the query.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Aggregate.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Aggregate.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Aggregate.window_compatible">
<code class="descname">window_compatible</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.Aggregate.window_compatible" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Avg">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Avg</code><span class="sig-paren">(</span><em>*args</em>, <em>filter=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Avg" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.aggregates.Aggregate</span></code></p>
<dl class="method">
<dt id="djongo.models.Avg.as_oracle">
<code class="descname">as_oracle</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Avg.as_oracle" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Avg.function">
<code class="descname">function</code><em class="property"> = 'AVG'</em><a class="headerlink" href="#djongo.models.Avg.function" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Avg.name">
<code class="descname">name</code><em class="property"> = 'Avg'</em><a class="headerlink" href="#djongo.models.Avg.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Count">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Count</code><span class="sig-paren">(</span><em>expression</em>, <em>distinct=False</em>, <em>filter=None</em>, <em>**extra</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Count" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.aggregates.Aggregate</span></code></p>
<dl class="method">
<dt id="djongo.models.Count.convert_value">
<code class="descname">convert_value</code><span class="sig-paren">(</span><em>value</em>, <em>expression</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Count.convert_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Expressions provide their own converters because users have the option
of manually specifying the output_field which may be a different type
from the one the database returns.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Count.function">
<code class="descname">function</code><em class="property"> = 'COUNT'</em><a class="headerlink" href="#djongo.models.Count.function" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Count.name">
<code class="descname">name</code><em class="property"> = 'Count'</em><a class="headerlink" href="#djongo.models.Count.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Count.output_field">
<code class="descname">output_field</code><em class="property"> = &lt;django.db.models.fields.IntegerField&gt;</em><a class="headerlink" href="#djongo.models.Count.output_field" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Count.template">
<code class="descname">template</code><em class="property"> = '%(function)s(%(distinct)s%(expressions)s)'</em><a class="headerlink" href="#djongo.models.Count.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Max">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Max</code><span class="sig-paren">(</span><em>*args</em>, <em>filter=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Max" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.aggregates.Aggregate</span></code></p>
<dl class="attribute">
<dt id="djongo.models.Max.function">
<code class="descname">function</code><em class="property"> = 'MAX'</em><a class="headerlink" href="#djongo.models.Max.function" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Max.name">
<code class="descname">name</code><em class="property"> = 'Max'</em><a class="headerlink" href="#djongo.models.Max.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Min">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Min</code><span class="sig-paren">(</span><em>*args</em>, <em>filter=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Min" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.aggregates.Aggregate</span></code></p>
<dl class="attribute">
<dt id="djongo.models.Min.function">
<code class="descname">function</code><em class="property"> = 'MIN'</em><a class="headerlink" href="#djongo.models.Min.function" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Min.name">
<code class="descname">name</code><em class="property"> = 'Min'</em><a class="headerlink" href="#djongo.models.Min.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.StdDev">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">StdDev</code><span class="sig-paren">(</span><em>expression</em>, <em>sample=False</em>, <em>**extra</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.StdDev" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.aggregates.Aggregate</span></code></p>
<dl class="attribute">
<dt id="djongo.models.StdDev.name">
<code class="descname">name</code><em class="property"> = 'StdDev'</em><a class="headerlink" href="#djongo.models.StdDev.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.StdDev.output_field">
<code class="descname">output_field</code><em class="property"> = &lt;django.db.models.fields.FloatField&gt;</em><a class="headerlink" href="#djongo.models.StdDev.output_field" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Sum">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Sum</code><span class="sig-paren">(</span><em>*args</em>, <em>filter=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Sum" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.aggregates.Aggregate</span></code></p>
<dl class="method">
<dt id="djongo.models.Sum.as_oracle">
<code class="descname">as_oracle</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Sum.as_oracle" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Sum.function">
<code class="descname">function</code><em class="property"> = 'SUM'</em><a class="headerlink" href="#djongo.models.Sum.function" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Sum.name">
<code class="descname">name</code><em class="property"> = 'Sum'</em><a class="headerlink" href="#djongo.models.Sum.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Variance">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Variance</code><span class="sig-paren">(</span><em>expression</em>, <em>sample=False</em>, <em>**extra</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Variance" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.aggregates.Aggregate</span></code></p>
<dl class="attribute">
<dt id="djongo.models.Variance.name">
<code class="descname">name</code><em class="property"> = 'Variance'</em><a class="headerlink" href="#djongo.models.Variance.name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Variance.output_field">
<code class="descname">output_field</code><em class="property"> = &lt;django.db.models.fields.FloatField&gt;</em><a class="headerlink" href="#djongo.models.Variance.output_field" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.AutoField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">AutoField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.AutoField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.contribute_to_class">
<code class="descname">contribute_to_class</code><span class="sig-paren">(</span><em>cls</em>, <em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.contribute_to_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Register the field with the model class it belongs to.</p>
<p>If private_only is True, create a separate instance of this field
for every subclass of cls, even if cls is not an abstract model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.AutoField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value must be an integer.&quot;}</em><a class="headerlink" href="#djongo.models.AutoField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.AutoField.description">
<code class="descname">description</code><em class="property"> = 'Integer'</em><a class="headerlink" href="#djongo.models.AutoField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.AutoField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.AutoField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.rel_db_type">
<code class="descname">rel_db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.rel_db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the data type that a related field pointing to this field should
use. For example, this method is called by ForeignKey and OneToOneField
to determine its data type.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.AutoField.validate">
<code class="descname">validate</code><span class="sig-paren">(</span><em>value</em>, <em>model_instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.AutoField.validate" title="Permalink to this definition">¶</a></dt>
<dd><p>Validate value and raise ValidationError if necessary. Subclasses
should override this to provide validation logic.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.BigAutoField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">BigAutoField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BigAutoField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.AutoField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.BigAutoField.description">
<code class="descname">description</code><em class="property"> = 'Big (8 byte) integer'</em><a class="headerlink" href="#djongo.models.BigAutoField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BigAutoField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BigAutoField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BigAutoField.rel_db_type">
<code class="descname">rel_db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BigAutoField.rel_db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the data type that a related field pointing to this field should
use. For example, this method is called by ForeignKey and OneToOneField
to determine its data type.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.BigIntegerField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">BigIntegerField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BigIntegerField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.IntegerField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.BigIntegerField.MAX_BIGINT">
<code class="descname">MAX_BIGINT</code><em class="property"> = 9223372036854775807</em><a class="headerlink" href="#djongo.models.BigIntegerField.MAX_BIGINT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.BigIntegerField.description">
<code class="descname">description</code><em class="property"> = 'Big (8 byte) integer'</em><a class="headerlink" href="#djongo.models.BigIntegerField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.BigIntegerField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.BigIntegerField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BigIntegerField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BigIntegerField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.BigIntegerField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BigIntegerField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.BinaryField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">BinaryField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.BinaryField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.BinaryField.description">
<code class="descname">description</code><em class="property"> = 'Raw binary data'</em><a class="headerlink" href="#djongo.models.BinaryField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.BinaryField.empty_values">
<code class="descname">empty_values</code><em class="property"> = [None, b'']</em><a class="headerlink" href="#djongo.models.BinaryField.empty_values" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BinaryField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.BinaryField.get_default">
<code class="descname">get_default</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField.get_default" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the default value for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.BinaryField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BinaryField.get_placeholder">
<code class="descname">get_placeholder</code><span class="sig-paren">(</span><em>value</em>, <em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField.get_placeholder" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BinaryField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.BinaryField.value_to_string">
<code class="descname">value_to_string</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BinaryField.value_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Binary data is serialized as base64</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.BooleanField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">BooleanField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BooleanField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.BooleanField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BooleanField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BooleanField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BooleanField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.BooleanField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value must be either True or False.&quot;}</em><a class="headerlink" href="#djongo.models.BooleanField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.BooleanField.description">
<code class="descname">description</code><em class="property"> = 'Boolean (Either True or False)'</em><a class="headerlink" href="#djongo.models.BooleanField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.BooleanField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.BooleanField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BooleanField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BooleanField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.BooleanField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BooleanField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.BooleanField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BooleanField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.BooleanField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.BooleanField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.CharField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">CharField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CharField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.CharField.cast_db_type">
<code class="descname">cast_db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CharField.cast_db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the data type to use in the Cast() function.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.CharField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CharField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.CharField.description">
<code class="descname">description</code><em class="property"> = 'String (up to %(max_length)s)'</em><a class="headerlink" href="#djongo.models.CharField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.CharField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CharField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.CharField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CharField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.CharField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CharField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.CharField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CharField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.CommaSeparatedIntegerField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">CommaSeparatedIntegerField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CommaSeparatedIntegerField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.CharField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.CommaSeparatedIntegerField.default_validators">
<code class="descname">default_validators</code><em class="property"> = [&lt;django.core.validators.RegexValidator object&gt;]</em><a class="headerlink" href="#djongo.models.CommaSeparatedIntegerField.default_validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.CommaSeparatedIntegerField.description">
<code class="descname">description</code><em class="property"> = 'Comma-separated integers'</em><a class="headerlink" href="#djongo.models.CommaSeparatedIntegerField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.CommaSeparatedIntegerField.system_check_removed_details">
<code class="descname">system_check_removed_details</code><em class="property"> = {'hint': 'Use CharField(validators=[validate_comma_separated_integer_list]) instead.', 'id': 'fields.E901', 'msg': 'CommaSeparatedIntegerField is removed except for support in historical migrations.'}</em><a class="headerlink" href="#djongo.models.CommaSeparatedIntegerField.system_check_removed_details" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.DateField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">DateField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>auto_now=False</em>, <em>auto_now_add=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.DateTimeCheckMixin</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="attribute">
<dt id="djongo.models.DateField.class_lookups">
<code class="descname">class_lookups</code><em class="property"> = {'day': &lt;class 'django.db.models.functions.datetime.ExtractDay'&gt;, 'month': &lt;class 'django.db.models.functions.datetime.ExtractMonth'&gt;, 'quarter': &lt;class 'django.db.models.functions.datetime.ExtractQuarter'&gt;, 'week': &lt;class 'django.db.models.functions.datetime.ExtractWeek'&gt;, 'week_day': &lt;class 'django.db.models.functions.datetime.ExtractWeekDay'&gt;, 'year': &lt;class 'django.db.models.functions.datetime.ExtractYear'&gt;}</em><a class="headerlink" href="#djongo.models.DateField.class_lookups" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.contribute_to_class">
<code class="descname">contribute_to_class</code><span class="sig-paren">(</span><em>cls</em>, <em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.contribute_to_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Register the field with the model class it belongs to.</p>
<p>If private_only is True, create a separate instance of this field
for every subclass of cls, even if cls is not an abstract model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.DateField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value has an invalid date format. It must be in YYYY-MM-DD format.&quot;, 'invalid_date': &quot;'%(value)s' value has the correct format (YYYY-MM-DD) but it is an invalid date.&quot;}</em><a class="headerlink" href="#djongo.models.DateField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DateField.description">
<code class="descname">description</code><em class="property"> = 'Date (without time)'</em><a class="headerlink" href="#djongo.models.DateField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DateField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.DateField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.pre_save">
<code class="descname">pre_save</code><span class="sig-paren">(</span><em>model_instance</em>, <em>add</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.pre_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value just before saving.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateField.value_to_string">
<code class="descname">value_to_string</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateField.value_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string value of this field from the passed obj.
This is used by the serialization framework.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.DateTimeField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">DateTimeField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>auto_now=False</em>, <em>auto_now_add=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.DateField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.DateTimeField.class_lookups">
<code class="descname">class_lookups</code><em class="property"> = {'date': &lt;class 'django.db.models.functions.datetime.TruncDate'&gt;, 'hour': &lt;class 'django.db.models.functions.datetime.ExtractHour'&gt;, 'minute': &lt;class 'django.db.models.functions.datetime.ExtractMinute'&gt;, 'second': &lt;class 'django.db.models.functions.datetime.ExtractSecond'&gt;, 'time': &lt;class 'django.db.models.functions.datetime.TruncTime'&gt;}</em><a class="headerlink" href="#djongo.models.DateTimeField.class_lookups" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DateTimeField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.&quot;, 'invalid_date': &quot;'%(value)s' value has the correct format (YYYY-MM-DD) but it is an invalid date.&quot;, 'invalid_datetime': &quot;'%(value)s' value has the correct format (YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ]) but it is an invalid date/time.&quot;}</em><a class="headerlink" href="#djongo.models.DateTimeField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DateTimeField.description">
<code class="descname">description</code><em class="property"> = 'Date (with time)'</em><a class="headerlink" href="#djongo.models.DateTimeField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DateTimeField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.DateTimeField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DateTimeField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateTimeField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateTimeField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DateTimeField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateTimeField.pre_save">
<code class="descname">pre_save</code><span class="sig-paren">(</span><em>model_instance</em>, <em>add</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField.pre_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value just before saving.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateTimeField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DateTimeField.value_to_string">
<code class="descname">value_to_string</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DateTimeField.value_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string value of this field from the passed obj.
This is used by the serialization framework.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.DecimalField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">DecimalField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>max_digits=None</em>, <em>decimal_places=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.DecimalField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DecimalField.context">
<code class="descname">context</code><a class="headerlink" href="#djongo.models.DecimalField.context" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DecimalField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.DecimalField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value must be a decimal number.&quot;}</em><a class="headerlink" href="#djongo.models.DecimalField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DecimalField.description">
<code class="descname">description</code><em class="property"> = 'Decimal number'</em><a class="headerlink" href="#djongo.models.DecimalField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DecimalField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.DecimalField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DecimalField.format_number">
<code class="descname">format_number</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.format_number" title="Permalink to this definition">¶</a></dt>
<dd><p>Format a number into a string with the requisite number of digits and
decimal places.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DecimalField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DecimalField.get_db_prep_save">
<code class="descname">get_db_prep_save</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.get_db_prep_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for saving into a database.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DecimalField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DecimalField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DecimalField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DecimalField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.DecimalField.validators">
<code class="descname">validators</code><a class="headerlink" href="#djongo.models.DecimalField.validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.DurationField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">DurationField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DurationField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<p>Store timedelta objects.</p>
<p>Use interval on PostgreSQL, INTERVAL DAY TO SECOND on Oracle, and bigint
of microseconds on other databases.</p>
<dl class="attribute">
<dt id="djongo.models.DurationField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value has an invalid format. It must be in [DD] [HH:[MM:]]ss[.uuuuuu] format.&quot;}</em><a class="headerlink" href="#djongo.models.DurationField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DurationField.description">
<code class="descname">description</code><em class="property"> = 'Duration'</em><a class="headerlink" href="#djongo.models.DurationField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.DurationField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.DurationField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DurationField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DurationField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DurationField.get_db_converters">
<code class="descname">get_db_converters</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DurationField.get_db_converters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DurationField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DurationField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DurationField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DurationField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.DurationField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DurationField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.DurationField.value_to_string">
<code class="descname">value_to_string</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DurationField.value_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string value of this field from the passed obj.
This is used by the serialization framework.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.EmailField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">EmailField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmailField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.CharField</span></code></p>
<dl class="method">
<dt id="djongo.models.EmailField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmailField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.EmailField.default_validators">
<code class="descname">default_validators</code><em class="property"> = [&lt;django.core.validators.EmailValidator object&gt;]</em><a class="headerlink" href="#djongo.models.EmailField.default_validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.EmailField.description">
<code class="descname">description</code><em class="property"> = 'Email address'</em><a class="headerlink" href="#djongo.models.EmailField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.EmailField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmailField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Empty">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Empty</code><a class="headerlink" href="#djongo.models.Empty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.Field">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Field</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.query_utils.RegisterLookupMixin</span></code></p>
<p>Base class for all field types</p>
<dl class="attribute">
<dt id="djongo.models.Field.auto_creation_counter">
<code class="descname">auto_creation_counter</code><em class="property"> = -1</em><a class="headerlink" href="#djongo.models.Field.auto_creation_counter" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.cached_col">
<code class="descname">cached_col</code><a class="headerlink" href="#djongo.models.Field.cached_col" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.cast_db_type">
<code class="descname">cast_db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.cast_db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the data type to use in the Cast() function.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.class_lookups">
<code class="descname">class_lookups</code><em class="property"> = {'contains': &lt;class 'django.db.models.lookups.Contains'&gt;, 'endswith': &lt;class 'django.db.models.lookups.EndsWith'&gt;, 'exact': &lt;class 'django.db.models.lookups.Exact'&gt;, 'gt': &lt;class 'django.db.models.lookups.GreaterThan'&gt;, 'gte': &lt;class 'django.db.models.lookups.GreaterThanOrEqual'&gt;, 'icontains': &lt;class 'django.db.models.lookups.IContains'&gt;, 'iendswith': &lt;class 'django.db.models.lookups.IEndsWith'&gt;, 'iexact': &lt;class 'django.db.models.lookups.IExact'&gt;, 'in': &lt;class 'django.db.models.lookups.In'&gt;, 'iregex': &lt;class 'django.db.models.lookups.IRegex'&gt;, 'isnull': &lt;class 'django.db.models.lookups.IsNull'&gt;, 'istartswith': &lt;class 'django.db.models.lookups.IStartsWith'&gt;, 'lt': &lt;class 'django.db.models.lookups.LessThan'&gt;, 'lte': &lt;class 'django.db.models.lookups.LessThanOrEqual'&gt;, 'range': &lt;class 'django.db.models.lookups.Range'&gt;, 'regex': &lt;class 'django.db.models.lookups.Regex'&gt;, 'startswith': &lt;class 'django.db.models.lookups.StartsWith'&gt;}</em><a class="headerlink" href="#djongo.models.Field.class_lookups" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.clean">
<code class="descname">clean</code><span class="sig-paren">(</span><em>value</em>, <em>model_instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.clean" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the value’s type and run validation. Validation errors
from to_python() and validate() are propagated. Return the correct
value if no error is raised.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.clone">
<code class="descname">clone</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.clone" title="Permalink to this definition">¶</a></dt>
<dd><p>Uses deconstruct() to clone a new copy of this Field.
Will not preserve any class attachments/attribute names.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.contribute_to_class">
<code class="descname">contribute_to_class</code><span class="sig-paren">(</span><em>cls</em>, <em>name</em>, <em>private_only=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.contribute_to_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Register the field with the model class it belongs to.</p>
<p>If private_only is True, create a separate instance of this field
for every subclass of cls, even if cls is not an abstract model.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.creation_counter">
<code class="descname">creation_counter</code><em class="property"> = 18</em><a class="headerlink" href="#djongo.models.Field.creation_counter" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.db_check">
<code class="descname">db_check</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.db_check" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the database column check constraint for this field, for the
provided connection. Works the same way as db_type() for the case that
get_internal_type() does not map to a preexisting model field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.db_parameters">
<code class="descname">db_parameters</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.db_parameters" title="Permalink to this definition">¶</a></dt>
<dd><p>Extension of db_type(), providing a range of different return values
(type, checks). This will look at db_type(), allowing custom model
fields to override it.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.db_tablespace">
<code class="descname">db_tablespace</code><a class="headerlink" href="#djongo.models.Field.db_tablespace" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.db_type">
<code class="descname">db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the database column data type for this field, for the provided
connection.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.db_type_parameters">
<code class="descname">db_type_parameters</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.db_type_parameters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.db_type_suffix">
<code class="descname">db_type_suffix</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.db_type_suffix" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'blank': 'This field cannot be blank.', 'invalid_choice': 'Value %(value)r is not a valid choice.', 'null': 'This field cannot be null.', 'unique': '%(model_name)s with this %(field_label)s already exists.', 'unique_for_date': '%(field_label)s must be unique for %(date_field_label)s %(lookup_type)s.'}</em><a class="headerlink" href="#djongo.models.Field.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.default_validators">
<code class="descname">default_validators</code><em class="property"> = []</em><a class="headerlink" href="#djongo.models.Field.default_validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.description">
<code class="descname">description</code><a class="headerlink" href="#djongo.models.Field.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.Field.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.empty_values">
<code class="descname">empty_values</code><em class="property"> = [None, '', [], (), {}]</em><a class="headerlink" href="#djongo.models.Field.empty_values" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.flatchoices">
<code class="descname">flatchoices</code><a class="headerlink" href="#djongo.models.Field.flatchoices" title="Permalink to this definition">¶</a></dt>
<dd><p>Flattened version of choices tuple.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>form_class=None</em>, <em>choices_form_class=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_attname">
<code class="descname">get_attname</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_attname" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_attname_column">
<code class="descname">get_attname_column</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_attname_column" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_choices">
<code class="descname">get_choices</code><span class="sig-paren">(</span><em>include_blank=True, blank_choice=[('', '---------')], limit_choices_to=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_choices" title="Permalink to this definition">¶</a></dt>
<dd><p>Return choices with a default blank choices included, for use
as &lt;select&gt; choices for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_col">
<code class="descname">get_col</code><span class="sig-paren">(</span><em>alias</em>, <em>output_field=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_col" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_db_converters">
<code class="descname">get_db_converters</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_db_converters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_db_prep_save">
<code class="descname">get_db_prep_save</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_db_prep_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for saving into a database.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_default">
<code class="descname">get_default</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_default" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the default value for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_filter_kwargs_for_object">
<code class="descname">get_filter_kwargs_for_object</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_filter_kwargs_for_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dict that when passed as kwargs to self.model.filter(), would
yield all instances having the same value for this field as obj has.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_pk_value_on_save">
<code class="descname">get_pk_value_on_save</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_pk_value_on_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Hook to generate new PK values on save. This method is called when
saving instances with no primary key value set. If this method returns
something else than None, then the returned value is used when saving
the new instance.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.has_default">
<code class="descname">has_default</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.has_default" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a boolean of whether this field has a default value.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.hidden">
<code class="descname">hidden</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.Field.hidden" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.many_to_many">
<code class="descname">many_to_many</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Field.many_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.many_to_one">
<code class="descname">many_to_one</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Field.many_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.one_to_many">
<code class="descname">one_to_many</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Field.one_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.one_to_one">
<code class="descname">one_to_one</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Field.one_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.pre_save">
<code class="descname">pre_save</code><span class="sig-paren">(</span><em>model_instance</em>, <em>add</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.pre_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value just before saving.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.rel_db_type">
<code class="descname">rel_db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.rel_db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the data type that a related field pointing to this field should
use. For example, this method is called by ForeignKey and OneToOneField
to determine its data type.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.related_model">
<code class="descname">related_model</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Field.related_model" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.run_validators">
<code class="descname">run_validators</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.run_validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.save_form_data">
<code class="descname">save_form_data</code><span class="sig-paren">(</span><em>instance</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.save_form_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.select_format">
<code class="descname">select_format</code><span class="sig-paren">(</span><em>compiler</em>, <em>sql</em>, <em>params</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.select_format" title="Permalink to this definition">¶</a></dt>
<dd><p>Custom format for select clauses. For example, GIS columns need to be
selected as AsText(table.col) on MySQL as the table.col data can’t be
used by Django.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.set_attributes_from_name">
<code class="descname">set_attributes_from_name</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.set_attributes_from_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.system_check_deprecated_details">
<code class="descname">system_check_deprecated_details</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Field.system_check_deprecated_details" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.system_check_removed_details">
<code class="descname">system_check_removed_details</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Field.system_check_removed_details" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.unique">
<code class="descname">unique</code><a class="headerlink" href="#djongo.models.Field.unique" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Field.validate">
<code class="descname">validate</code><span class="sig-paren">(</span><em>value</em>, <em>model_instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.validate" title="Permalink to this definition">¶</a></dt>
<dd><p>Validate value and raise ValidationError if necessary. Subclasses
should override this to provide validation logic.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Field.validators">
<code class="descname">validators</code><a class="headerlink" href="#djongo.models.Field.validators" title="Permalink to this definition">¶</a></dt>
<dd><p>Some validators can’t be created at field initialization time.
This method provides a way to delay their creation until required.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.value_from_object">
<code class="descname">value_from_object</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.value_from_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the value of this field in the given model instance.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Field.value_to_string">
<code class="descname">value_to_string</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Field.value_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string value of this field from the passed obj.
This is used by the serialization framework.</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="djongo.models.FieldDoesNotExist">
<em class="property">exception </em><code class="descclassname">djongo.models.</code><code class="descname">FieldDoesNotExist</code><a class="headerlink" href="#djongo.models.FieldDoesNotExist" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>The requested model field does not exist</p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.FilePathField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">FilePathField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>path=''</em>, <em>match=None</em>, <em>recursive=False</em>, <em>allow_files=True</em>, <em>allow_folders=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilePathField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.FilePathField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilePathField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FilePathField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilePathField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.FilePathField.description">
<code class="descname">description</code><em class="property"> = 'File path'</em><a class="headerlink" href="#djongo.models.FilePathField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FilePathField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilePathField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FilePathField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilePathField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FilePathField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilePathField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.FloatField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">FloatField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FloatField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="attribute">
<dt id="djongo.models.FloatField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value must be a float.&quot;}</em><a class="headerlink" href="#djongo.models.FloatField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.FloatField.description">
<code class="descname">description</code><em class="property"> = 'Floating point number'</em><a class="headerlink" href="#djongo.models.FloatField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.FloatField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.FloatField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FloatField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FloatField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FloatField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FloatField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FloatField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FloatField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FloatField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FloatField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.GenericIPAddressField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">GenericIPAddressField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>protocol='both'</em>, <em>unpack_ipv4=False</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.GenericIPAddressField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.GenericIPAddressField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.GenericIPAddressField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {}</em><a class="headerlink" href="#djongo.models.GenericIPAddressField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.GenericIPAddressField.description">
<code class="descname">description</code><em class="property"> = 'IP address'</em><a class="headerlink" href="#djongo.models.GenericIPAddressField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.GenericIPAddressField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.GenericIPAddressField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.GenericIPAddressField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.GenericIPAddressField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.GenericIPAddressField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.GenericIPAddressField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.GenericIPAddressField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.GenericIPAddressField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.IPAddressField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">IPAddressField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IPAddressField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.IPAddressField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IPAddressField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.IPAddressField.description">
<code class="descname">description</code><em class="property"> = 'IPv4 address'</em><a class="headerlink" href="#djongo.models.IPAddressField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.IPAddressField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.IPAddressField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.IPAddressField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IPAddressField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.IPAddressField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IPAddressField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.IPAddressField.system_check_removed_details">
<code class="descname">system_check_removed_details</code><em class="property"> = {'hint': 'Use GenericIPAddressField instead.', 'id': 'fields.E900', 'msg': 'IPAddressField has been removed except for support in historical migrations.'}</em><a class="headerlink" href="#djongo.models.IPAddressField.system_check_removed_details" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.IntegerField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">IntegerField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IntegerField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.IntegerField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IntegerField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.IntegerField.class_lookups">
<code class="descname">class_lookups</code><em class="property"> = {'gte': &lt;class 'django.db.models.lookups.IntegerGreaterThanOrEqual'&gt;, 'lt': &lt;class 'django.db.models.lookups.IntegerLessThan'&gt;}</em><a class="headerlink" href="#djongo.models.IntegerField.class_lookups" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.IntegerField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value must be an integer.&quot;}</em><a class="headerlink" href="#djongo.models.IntegerField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.IntegerField.description">
<code class="descname">description</code><em class="property"> = 'Integer'</em><a class="headerlink" href="#djongo.models.IntegerField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.IntegerField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.IntegerField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.IntegerField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IntegerField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.IntegerField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IntegerField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.IntegerField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IntegerField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.IntegerField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.IntegerField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.IntegerField.validators">
<code class="descname">validators</code><a class="headerlink" href="#djongo.models.IntegerField.validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.NOT_PROVIDED">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">NOT_PROVIDED</code><a class="headerlink" href="#djongo.models.NOT_PROVIDED" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.NullBooleanField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">NullBooleanField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.NullBooleanField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.NullBooleanField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.NullBooleanField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.NullBooleanField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value must be either None, True or False.&quot;}</em><a class="headerlink" href="#djongo.models.NullBooleanField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.NullBooleanField.description">
<code class="descname">description</code><em class="property"> = 'Boolean (Either True, False or None)'</em><a class="headerlink" href="#djongo.models.NullBooleanField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.NullBooleanField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.NullBooleanField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.NullBooleanField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.NullBooleanField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.NullBooleanField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.NullBooleanField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.NullBooleanField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.NullBooleanField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.NullBooleanField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.NullBooleanField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.PositiveIntegerField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">PositiveIntegerField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.PositiveIntegerField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.PositiveIntegerRelDbTypeMixin</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.IntegerField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.PositiveIntegerField.description">
<code class="descname">description</code><em class="property"> = 'Positive integer'</em><a class="headerlink" href="#djongo.models.PositiveIntegerField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.PositiveIntegerField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.PositiveIntegerField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.PositiveIntegerField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.PositiveIntegerField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.PositiveSmallIntegerField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">PositiveSmallIntegerField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.PositiveSmallIntegerField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.PositiveIntegerRelDbTypeMixin</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.IntegerField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.PositiveSmallIntegerField.description">
<code class="descname">description</code><em class="property"> = 'Positive small integer'</em><a class="headerlink" href="#djongo.models.PositiveSmallIntegerField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.PositiveSmallIntegerField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.PositiveSmallIntegerField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.PositiveSmallIntegerField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.PositiveSmallIntegerField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.SlugField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">SlugField</code><span class="sig-paren">(</span><em>*args</em>, <em>max_length=50</em>, <em>db_index=True</em>, <em>allow_unicode=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SlugField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.CharField</span></code></p>
<dl class="method">
<dt id="djongo.models.SlugField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SlugField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.SlugField.default_validators">
<code class="descname">default_validators</code><em class="property"> = [&lt;django.core.validators.RegexValidator object&gt;]</em><a class="headerlink" href="#djongo.models.SlugField.default_validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.SlugField.description">
<code class="descname">description</code><em class="property"> = 'Slug (up to %(max_length)s)'</em><a class="headerlink" href="#djongo.models.SlugField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.SlugField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SlugField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.SlugField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SlugField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.SmallIntegerField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">SmallIntegerField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SmallIntegerField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.IntegerField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.SmallIntegerField.description">
<code class="descname">description</code><em class="property"> = 'Small integer'</em><a class="headerlink" href="#djongo.models.SmallIntegerField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.SmallIntegerField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SmallIntegerField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.TextField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">TextField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>primary_key=False</em>, <em>max_length=None</em>, <em>unique=False</em>, <em>blank=False</em>, <em>null=False</em>, <em>db_index=False</em>, <em>rel=None</em>, <em>default=&lt;class 'django.db.models.fields.NOT_PROVIDED'&gt;</em>, <em>editable=True</em>, <em>serialize=True</em>, <em>unique_for_date=None</em>, <em>unique_for_month=None</em>, <em>unique_for_year=None</em>, <em>choices=None</em>, <em>help_text=''</em>, <em>db_column=None</em>, <em>db_tablespace=None</em>, <em>auto_created=False</em>, <em>validators=()</em>, <em>error_messages=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TextField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="attribute">
<dt id="djongo.models.TextField.description">
<code class="descname">description</code><em class="property"> = 'Text'</em><a class="headerlink" href="#djongo.models.TextField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.TextField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TextField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.TextField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TextField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.TextField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TextField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.TextField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TextField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.TimeField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">TimeField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>auto_now=False</em>, <em>auto_now_add=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.DateTimeCheckMixin</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="attribute">
<dt id="djongo.models.TimeField.class_lookups">
<code class="descname">class_lookups</code><em class="property"> = {'hour': &lt;class 'django.db.models.functions.datetime.ExtractHour'&gt;, 'minute': &lt;class 'django.db.models.functions.datetime.ExtractMinute'&gt;, 'second': &lt;class 'django.db.models.functions.datetime.ExtractSecond'&gt;}</em><a class="headerlink" href="#djongo.models.TimeField.class_lookups" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.TimeField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' value has an invalid format. It must be in HH:MM[:ss[.uuuuuu]] format.&quot;, 'invalid_time': &quot;'%(value)s' value has the correct format (HH:MM[:ss[.uuuuuu]]) but it is an invalid time.&quot;}</em><a class="headerlink" href="#djongo.models.TimeField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.TimeField.description">
<code class="descname">description</code><em class="property"> = 'Time'</em><a class="headerlink" href="#djongo.models.TimeField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.TimeField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.TimeField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.pre_save">
<code class="descname">pre_save</code><span class="sig-paren">(</span><em>model_instance</em>, <em>add</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.pre_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value just before saving.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.TimeField.value_to_string">
<code class="descname">value_to_string</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.TimeField.value_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string value of this field from the passed obj.
This is used by the serialization framework.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.URLField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">URLField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.URLField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.CharField</span></code></p>
<dl class="method">
<dt id="djongo.models.URLField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.URLField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.URLField.default_validators">
<code class="descname">default_validators</code><em class="property"> = [&lt;django.core.validators.URLValidator object&gt;]</em><a class="headerlink" href="#djongo.models.URLField.default_validators" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.URLField.description">
<code class="descname">description</code><em class="property"> = 'URL'</em><a class="headerlink" href="#djongo.models.URLField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.URLField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.URLField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.UUIDField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">UUIDField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.UUIDField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="method">
<dt id="djongo.models.UUIDField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.UUIDField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.UUIDField.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': &quot;'%(value)s' is not a valid UUID.&quot;}</em><a class="headerlink" href="#djongo.models.UUIDField.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.UUIDField.description">
<code class="descname">description</code><em class="property"> = 'Universally unique identifier'</em><a class="headerlink" href="#djongo.models.UUIDField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.UUIDField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.UUIDField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.UUIDField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.UUIDField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.UUIDField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.UUIDField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.UUIDField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.UUIDField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.UUIDField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.UUIDField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Index">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Index</code><span class="sig-paren">(</span><em>*</em>, <em>fields=[]</em>, <em>name=None</em>, <em>db_tablespace=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Index" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="method">
<dt id="djongo.models.Index.check_name">
<code class="descname">check_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Index.check_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Index.clone">
<code class="descname">clone</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Index.clone" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a copy of this Index.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Index.create_sql">
<code class="descname">create_sql</code><span class="sig-paren">(</span><em>model</em>, <em>schema_editor</em>, <em>using=''</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Index.create_sql" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Index.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Index.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Index.max_name_length">
<code class="descname">max_name_length</code><em class="property"> = 30</em><a class="headerlink" href="#djongo.models.Index.max_name_length" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Index.remove_sql">
<code class="descname">remove_sql</code><span class="sig-paren">(</span><em>model</em>, <em>schema_editor</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Index.remove_sql" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Index.set_name_with_model">
<code class="descname">set_name_with_model</code><span class="sig-paren">(</span><em>model</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Index.set_name_with_model" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate a unique name for the index.</p>
<p>The name is divided into 3 parts - table name (12 chars), field name
(8 chars) and unique hash + suffix (10 chars). Each part is made to
fit its size by truncating the excess length.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Index.suffix">
<code class="descname">suffix</code><em class="property"> = 'idx'</em><a class="headerlink" href="#djongo.models.Index.suffix" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="djongo.models.ObjectDoesNotExist">
<em class="property">exception </em><code class="descclassname">djongo.models.</code><code class="descname">ObjectDoesNotExist</code><a class="headerlink" href="#djongo.models.ObjectDoesNotExist" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>The requested object does not exist</p>
<dl class="attribute">
<dt id="djongo.models.ObjectDoesNotExist.silent_variable_failure">
<code class="descname">silent_variable_failure</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.ObjectDoesNotExist.silent_variable_failure" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="djongo.models.CASCADE">
<code class="descclassname">djongo.models.</code><code class="descname">CASCADE</code><span class="sig-paren">(</span><em>collector</em>, <em>field</em>, <em>sub_objs</em>, <em>using</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.CASCADE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="djongo.models.DO_NOTHING">
<code class="descclassname">djongo.models.</code><code class="descname">DO_NOTHING</code><span class="sig-paren">(</span><em>collector</em>, <em>field</em>, <em>sub_objs</em>, <em>using</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.DO_NOTHING" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="djongo.models.PROTECT">
<code class="descclassname">djongo.models.</code><code class="descname">PROTECT</code><span class="sig-paren">(</span><em>collector</em>, <em>field</em>, <em>sub_objs</em>, <em>using</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.PROTECT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="djongo.models.SET">
<code class="descclassname">djongo.models.</code><code class="descname">SET</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SET" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="djongo.models.SET_DEFAULT">
<code class="descclassname">djongo.models.</code><code class="descname">SET_DEFAULT</code><span class="sig-paren">(</span><em>collector</em>, <em>field</em>, <em>sub_objs</em>, <em>using</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SET_DEFAULT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="djongo.models.SET_NULL">
<code class="descclassname">djongo.models.</code><code class="descname">SET_NULL</code><span class="sig-paren">(</span><em>collector</em>, <em>field</em>, <em>sub_objs</em>, <em>using</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.SET_NULL" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="exception">
<dt id="djongo.models.ProtectedError">
<em class="property">exception </em><code class="descclassname">djongo.models.</code><code class="descname">ProtectedError</code><span class="sig-paren">(</span><em>msg</em>, <em>protected_objects</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ProtectedError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.utils.IntegrityError</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.Case">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Case</code><span class="sig-paren">(</span><em>*cases</em>, <em>default=None</em>, <em>output_field=None</em>, <em>**extra</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Case" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<p>An SQL searched CASE expression:</p>
<blockquote>
<div><dl class="docutils">
<dt>CASE</dt>
<dd><dl class="first docutils">
<dt>WHEN n &gt; 0</dt>
<dd>THEN ‘positive’</dd>
<dt>WHEN n &lt; 0</dt>
<dd>THEN ‘negative’</dd>
</dl>
<p class="last">ELSE ‘zero’</p>
</dd>
</dl>
<p>END</p>
</div></blockquote>
<dl class="method">
<dt id="djongo.models.Case.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>template=None</em>, <em>case_joiner=None</em>, <em>**extra_context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Case.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id7"><span class="problematic" id="id8">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id67"><span class="problematic" id="id68">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id9"><span class="problematic" id="id10">``</span></a><a href="#id11"><span class="problematic" id="id12">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Case.case_joiner">
<code class="descname">case_joiner</code><em class="property"> = ' '</em><a class="headerlink" href="#djongo.models.Case.case_joiner" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Case.copy">
<code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Case.copy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Case.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Case.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Case.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Case.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide the chance to do any preprocessing or validation before being
added to the query.</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>query: the backend query implementation</li>
<li>allow_joins: boolean allowing or denying use of joins
in this query</li>
<li>reuse: a set of reusable joins for multijoins</li>
<li>summarize: a terminal aggregate clause</li>
<li>for_save: whether this expression about to be used in a save or update</li>
</ul>
</dd>
</dl>
<p>Return: an Expression to be added to the query.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Case.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Case.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Case.template">
<code class="descname">template</code><em class="property"> = 'CASE %(cases)s ELSE %(default)s END'</em><a class="headerlink" href="#djongo.models.Case.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Exists">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Exists</code><span class="sig-paren">(</span><em>*args</em>, <em>negated=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Exists" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Subquery</span></code></p>
<dl class="method">
<dt id="djongo.models.Exists.as_oracle">
<code class="descname">as_oracle</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>template=None</em>, <em>**extra_context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Exists.as_oracle" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Exists.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>template=None</em>, <em>**extra_context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Exists.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id13"><span class="problematic" id="id14">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id69"><span class="problematic" id="id70">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id15"><span class="problematic" id="id16">``</span></a><a href="#id17"><span class="problematic" id="id18">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Exists.output_field">
<code class="descname">output_field</code><em class="property"> = &lt;django.db.models.fields.BooleanField&gt;</em><a class="headerlink" href="#djongo.models.Exists.output_field" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Exists.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Exists.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide the chance to do any preprocessing or validation before being
added to the query.</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>query: the backend query implementation</li>
<li>allow_joins: boolean allowing or denying use of joins
in this query</li>
<li>reuse: a set of reusable joins for multijoins</li>
<li>summarize: a terminal aggregate clause</li>
<li>for_save: whether this expression about to be used in a save or update</li>
</ul>
</dd>
</dl>
<p>Return: an Expression to be added to the query.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Exists.template">
<code class="descname">template</code><em class="property"> = 'EXISTS(%(subquery)s)'</em><a class="headerlink" href="#djongo.models.Exists.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Expression">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Expression</code><span class="sig-paren">(</span><em>output_field=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.BaseExpression</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Combinable</span></code></p>
<p>An expression that can be combined with other expressions.</p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.ExpressionList">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ExpressionList</code><span class="sig-paren">(</span><em>*expressions</em>, <em>**extra</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ExpressionList" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Func</span></code></p>
<p>An expression containing multiple expressions. Can be used to provide a
list of expressions as an argument to another expression, like an
ordering clause.</p>
<dl class="attribute">
<dt id="djongo.models.ExpressionList.template">
<code class="descname">template</code><em class="property"> = '%(expressions)s'</em><a class="headerlink" href="#djongo.models.ExpressionList.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ExpressionWrapper">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ExpressionWrapper</code><span class="sig-paren">(</span><em>expression</em>, <em>output_field</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ExpressionWrapper" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<p>An expression that can wrap another expression so that it can provide
extra context to the inner expression, such as the output_field.</p>
<dl class="method">
<dt id="djongo.models.ExpressionWrapper.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ExpressionWrapper.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id19"><span class="problematic" id="id20">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id71"><span class="problematic" id="id72">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id21"><span class="problematic" id="id22">``</span></a><a href="#id23"><span class="problematic" id="id24">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ExpressionWrapper.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ExpressionWrapper.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ExpressionWrapper.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ExpressionWrapper.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.F">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">F</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.F" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Combinable</span></code></p>
<p>An object capable of resolving references to existing query objects.</p>
<dl class="method">
<dt id="djongo.models.F.asc">
<code class="descname">asc</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.F.asc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.F.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.F.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a 3-tuple of class import path, positional arguments,
and keyword arguments.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.F.desc">
<code class="descname">desc</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.F.desc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.F.filterable">
<code class="descname">filterable</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.F.filterable" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.F.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.F.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Func">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Func</code><span class="sig-paren">(</span><em>*expressions</em>, <em>output_field=None</em>, <em>**extra</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Func" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.SQLiteNumericMixin</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<p>An SQL function call.</p>
<dl class="attribute">
<dt id="djongo.models.Func.arg_joiner">
<code class="descname">arg_joiner</code><em class="property"> = ', '</em><a class="headerlink" href="#djongo.models.Func.arg_joiner" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Func.arity">
<code class="descname">arity</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Func.arity" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Func.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>function=None</em>, <em>template=None</em>, <em>arg_joiner=None</em>, <em>**extra_context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Func.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id25"><span class="problematic" id="id26">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id73"><span class="problematic" id="id74">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id27"><span class="problematic" id="id28">``</span></a><a href="#id29"><span class="problematic" id="id30">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Func.copy">
<code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Func.copy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Func.function">
<code class="descname">function</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Func.function" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Func.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Func.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Func.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Func.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide the chance to do any preprocessing or validation before being
added to the query.</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>query: the backend query implementation</li>
<li>allow_joins: boolean allowing or denying use of joins
in this query</li>
<li>reuse: a set of reusable joins for multijoins</li>
<li>summarize: a terminal aggregate clause</li>
<li>for_save: whether this expression about to be used in a save or update</li>
</ul>
</dd>
</dl>
<p>Return: an Expression to be added to the query.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Func.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Func.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Func.template">
<code class="descname">template</code><em class="property"> = '%(function)s(%(expressions)s)'</em><a class="headerlink" href="#djongo.models.Func.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.OuterRef">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">OuterRef</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OuterRef" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.F</span></code></p>
<dl class="method">
<dt id="djongo.models.OuterRef.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OuterRef.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.RowRange">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">RowRange</code><span class="sig-paren">(</span><em>start=None</em>, <em>end=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.RowRange" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.WindowFrame</span></code></p>
<dl class="attribute">
<dt id="djongo.models.RowRange.frame_type">
<code class="descname">frame_type</code><em class="property"> = 'ROWS'</em><a class="headerlink" href="#djongo.models.RowRange.frame_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.RowRange.window_frame_start_end">
<code class="descname">window_frame_start_end</code><span class="sig-paren">(</span><em>connection</em>, <em>start</em>, <em>end</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.RowRange.window_frame_start_end" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Subquery">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Subquery</code><span class="sig-paren">(</span><em>queryset</em>, <em>output_field=None</em>, <em>**extra</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Subquery" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<p>An explicit subquery. It may contain OuterRef() references to the outer
query which will be resolved when it is applied to that query.</p>
<dl class="method">
<dt id="djongo.models.Subquery.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>template=None</em>, <em>**extra_context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Subquery.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id31"><span class="problematic" id="id32">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id75"><span class="problematic" id="id76">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id33"><span class="problematic" id="id34">``</span></a><a href="#id35"><span class="problematic" id="id36">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Subquery.copy">
<code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Subquery.copy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Subquery.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Subquery.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Subquery.relabeled_clone">
<code class="descname">relabeled_clone</code><span class="sig-paren">(</span><em>change_map</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Subquery.relabeled_clone" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Subquery.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Subquery.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide the chance to do any preprocessing or validation before being
added to the query.</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>query: the backend query implementation</li>
<li>allow_joins: boolean allowing or denying use of joins
in this query</li>
<li>reuse: a set of reusable joins for multijoins</li>
<li>summarize: a terminal aggregate clause</li>
<li>for_save: whether this expression about to be used in a save or update</li>
</ul>
</dd>
</dl>
<p>Return: an Expression to be added to the query.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Subquery.template">
<code class="descname">template</code><em class="property"> = '(%(subquery)s)'</em><a class="headerlink" href="#djongo.models.Subquery.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Value">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Value</code><span class="sig-paren">(</span><em>value</em>, <em>output_field=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Value" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<p>Represent a wrapped value as a node within an expression.</p>
<dl class="method">
<dt id="djongo.models.Value.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Value.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id37"><span class="problematic" id="id38">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id77"><span class="problematic" id="id78">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id39"><span class="problematic" id="id40">``</span></a><a href="#id41"><span class="problematic" id="id42">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Value.get_group_by_cols">
<code class="descname">get_group_by_cols</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Value.get_group_by_cols" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Value.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Value.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide the chance to do any preprocessing or validation before being
added to the query.</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>query: the backend query implementation</li>
<li>allow_joins: boolean allowing or denying use of joins
in this query</li>
<li>reuse: a set of reusable joins for multijoins</li>
<li>summarize: a terminal aggregate clause</li>
<li>for_save: whether this expression about to be used in a save or update</li>
</ul>
</dd>
</dl>
<p>Return: an Expression to be added to the query.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ValueRange">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ValueRange</code><span class="sig-paren">(</span><em>start=None</em>, <em>end=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ValueRange" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.WindowFrame</span></code></p>
<dl class="attribute">
<dt id="djongo.models.ValueRange.frame_type">
<code class="descname">frame_type</code><em class="property"> = 'RANGE'</em><a class="headerlink" href="#djongo.models.ValueRange.frame_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ValueRange.window_frame_start_end">
<code class="descname">window_frame_start_end</code><span class="sig-paren">(</span><em>connection</em>, <em>start</em>, <em>end</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ValueRange.window_frame_start_end" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.When">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">When</code><span class="sig-paren">(</span><em>condition=None</em>, <em>then=None</em>, <em>**lookups</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.When" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<dl class="method">
<dt id="djongo.models.When.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>template=None</em>, <em>**extra_context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.When.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id43"><span class="problematic" id="id44">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id79"><span class="problematic" id="id80">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id45"><span class="problematic" id="id46">``</span></a><a href="#id47"><span class="problematic" id="id48">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="djongo.models.When.get_group_by_cols">
<code class="descname">get_group_by_cols</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.When.get_group_by_cols" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.When.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.When.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.When.get_source_fields">
<code class="descname">get_source_fields</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.When.get_source_fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the underlying field types used by this aggregate.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.When.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.When.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide the chance to do any preprocessing or validation before being
added to the query.</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>query: the backend query implementation</li>
<li>allow_joins: boolean allowing or denying use of joins
in this query</li>
<li>reuse: a set of reusable joins for multijoins</li>
<li>summarize: a terminal aggregate clause</li>
<li>for_save: whether this expression about to be used in a save or update</li>
</ul>
</dd>
</dl>
<p>Return: an Expression to be added to the query.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.When.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.When.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.When.template">
<code class="descname">template</code><em class="property"> = 'WHEN %(condition)s THEN %(result)s'</em><a class="headerlink" href="#djongo.models.When.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Window">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Window</code><span class="sig-paren">(</span><em>expression</em>, <em>partition_by=None</em>, <em>order_by=None</em>, <em>frame=None</em>, <em>output_field=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Window" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<dl class="method">
<dt id="djongo.models.Window.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>function=None</em>, <em>template=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Window.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id49"><span class="problematic" id="id50">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id81"><span class="problematic" id="id82">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id51"><span class="problematic" id="id52">``</span></a><a href="#id53"><span class="problematic" id="id54">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Window.contains_aggregate">
<code class="descname">contains_aggregate</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.Window.contains_aggregate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Window.contains_over_clause">
<code class="descname">contains_over_clause</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.Window.contains_over_clause" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Window.filterable">
<code class="descname">filterable</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.Window.filterable" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Window.get_group_by_cols">
<code class="descname">get_group_by_cols</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Window.get_group_by_cols" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Window.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Window.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Window.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Window.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Window.template">
<code class="descname">template</code><em class="property"> = '%(expression)s OVER (%(window)s)'</em><a class="headerlink" href="#djongo.models.Window.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.WindowFrame">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">WindowFrame</code><span class="sig-paren">(</span><em>start=None</em>, <em>end=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.WindowFrame" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Expression</span></code></p>
<p>Model the frame clause in window expressions. There are two types of frame
clauses which are subclasses, however, all processing and validation (by no
means intended to be complete) is done here. Thus, providing an end for a
frame is optional (the default is UNBOUNDED FOLLOWING, which is the last
row in the frame).</p>
<dl class="method">
<dt id="djongo.models.WindowFrame.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.WindowFrame.as_sql" title="Permalink to this definition">¶</a></dt>
<dd><p>Responsible for returning a (sql, [params]) tuple to be included
in the current query.</p>
<p>Different backends can provide their own implementation, by
providing an <cite>as_{vendor}</cite> method and patching the Expression:</p>
<p><a href="#id55"><span class="problematic" id="id56">``</span></a>`
def override_as_sql(self, compiler, connection):</p>
<blockquote>
<div># custom logic
return super().as_sql(compiler, connection)</div></blockquote>
<p>setattr(Expression, ‘<a href="#id83"><span class="problematic" id="id84">as_</span></a>’ + connection.vendor, override_as_sql)
<a href="#id57"><span class="problematic" id="id58">``</span></a><a href="#id59"><span class="problematic" id="id60">`</span></a></p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd><ul class="first last simple">
<li>compiler: the query compiler responsible for generating the query.
Must have a compile method, returning a (sql, [params]) tuple.
Calling compiler(value) will return a quoted <cite>value</cite>.</li>
<li>connection: the database connection used for the current query.</li>
</ul>
</dd>
<dt>Return: (sql, params)</dt>
<dd>Where <cite>sql</cite> is a string containing ordered sql parameters to be
replaced with the elements of the list <cite>params</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="djongo.models.WindowFrame.get_group_by_cols">
<code class="descname">get_group_by_cols</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.WindowFrame.get_group_by_cols" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.WindowFrame.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.WindowFrame.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.WindowFrame.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.WindowFrame.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.WindowFrame.template">
<code class="descname">template</code><em class="property"> = '%(frame_type)s BETWEEN %(start)s AND %(end)s'</em><a class="headerlink" href="#djongo.models.WindowFrame.template" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.WindowFrame.window_frame_start_end">
<code class="descname">window_frame_start_end</code><span class="sig-paren">(</span><em>connection</em>, <em>start</em>, <em>end</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.WindowFrame.window_frame_start_end" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.FileField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">FileField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>upload_to=''</em>, <em>storage=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<dl class="attribute">
<dt id="djongo.models.FileField.attr_class">
<code class="descname">attr_class</code><a class="headerlink" href="#djongo.models.FileField.attr_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">FieldFile</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.contribute_to_class">
<code class="descname">contribute_to_class</code><span class="sig-paren">(</span><em>cls</em>, <em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.contribute_to_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Register the field with the model class it belongs to.</p>
<p>If private_only is True, create a separate instance of this field
for every subclass of cls, even if cls is not an abstract model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.FileField.description">
<code class="descname">description</code><em class="property"> = 'File'</em><a class="headerlink" href="#djongo.models.FileField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.FileField.descriptor_class">
<code class="descname">descriptor_class</code><a class="headerlink" href="#djongo.models.FileField.descriptor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">FileDescriptor</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.generate_filename">
<code class="descname">generate_filename</code><span class="sig-paren">(</span><em>instance</em>, <em>filename</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.generate_filename" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply (if callable) or prepend (if a string) upload_to to the filename,
then delegate further processing of the name to the storage backend.
Until the storage layer, all file paths are expected to be Unix style
(with forward slashes).</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.get_internal_type">
<code class="descname">get_internal_type</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.get_internal_type" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.pre_save">
<code class="descname">pre_save</code><span class="sig-paren">(</span><em>model_instance</em>, <em>add</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.pre_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value just before saving.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.FileField.save_form_data">
<code class="descname">save_form_data</code><span class="sig-paren">(</span><em>instance</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FileField.save_form_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ImageField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ImageField</code><span class="sig-paren">(</span><em>verbose_name=None</em>, <em>name=None</em>, <em>width_field=None</em>, <em>height_field=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ImageField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.files.FileField</span></code></p>
<dl class="attribute">
<dt id="djongo.models.ImageField.attr_class">
<code class="descname">attr_class</code><a class="headerlink" href="#djongo.models.ImageField.attr_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">ImageFieldFile</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ImageField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ImageField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ImageField.contribute_to_class">
<code class="descname">contribute_to_class</code><span class="sig-paren">(</span><em>cls</em>, <em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ImageField.contribute_to_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Register the field with the model class it belongs to.</p>
<p>If private_only is True, create a separate instance of this field
for every subclass of cls, even if cls is not an abstract model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ImageField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ImageField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ImageField.description">
<code class="descname">description</code><em class="property"> = 'Image'</em><a class="headerlink" href="#djongo.models.ImageField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ImageField.descriptor_class">
<code class="descname">descriptor_class</code><a class="headerlink" href="#djongo.models.ImageField.descriptor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">ImageFileDescriptor</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ImageField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ImageField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ImageField.update_dimension_fields">
<code class="descname">update_dimension_fields</code><span class="sig-paren">(</span><em>instance</em>, <em>force=False</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ImageField.update_dimension_fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Update field’s width and height fields, if defined.</p>
<p>This method is hooked up to model’s post_init signal to update
dimensions after instantiating a model instance.  However, dimensions
won’t be updated if the dimensions fields are already populated.  This
avoids unnecessary recalculation when loading an object from the
database.</p>
<p>Dimensions can be forced to update with force=True, which is how
ImageFileDescriptor.__set__ calls this method.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.OrderWrt">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">OrderWrt</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OrderWrt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.IntegerField</span></code></p>
<p>A proxy for the _order database field that is used when
Meta.order_with_respect_to is specified.</p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.Lookup">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Lookup</code><span class="sig-paren">(</span><em>lhs</em>, <em>rhs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="method">
<dt id="djongo.models.Lookup.apply_bilateral_transforms">
<code class="descname">apply_bilateral_transforms</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.apply_bilateral_transforms" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.as_sql" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.batch_process_rhs">
<code class="descname">batch_process_rhs</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>rhs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.batch_process_rhs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Lookup.contains_aggregate">
<code class="descname">contains_aggregate</code><a class="headerlink" href="#djongo.models.Lookup.contains_aggregate" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Lookup.contains_over_clause">
<code class="descname">contains_over_clause</code><a class="headerlink" href="#djongo.models.Lookup.contains_over_clause" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.get_db_prep_lookup">
<code class="descname">get_db_prep_lookup</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.get_db_prep_lookup" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.get_group_by_cols">
<code class="descname">get_group_by_cols</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.get_group_by_cols" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.get_prep_lookup">
<code class="descname">get_prep_lookup</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.get_prep_lookup" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.get_source_expressions">
<code class="descname">get_source_expressions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.get_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Lookup.is_summary">
<code class="descname">is_summary</code><a class="headerlink" href="#djongo.models.Lookup.is_summary" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Lookup.lookup_name">
<code class="descname">lookup_name</code><em class="property"> = None</em><a class="headerlink" href="#djongo.models.Lookup.lookup_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Lookup.prepare_rhs">
<code class="descname">prepare_rhs</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.Lookup.prepare_rhs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.process_lhs">
<code class="descname">process_lhs</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em>, <em>lhs=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.process_lhs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.process_rhs">
<code class="descname">process_rhs</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.process_rhs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.relabeled_clone">
<code class="descname">relabeled_clone</code><span class="sig-paren">(</span><em>relabels</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.relabeled_clone" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.rhs_is_direct_value">
<code class="descname">rhs_is_direct_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.rhs_is_direct_value" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Lookup.set_source_expressions">
<code class="descname">set_source_expressions</code><span class="sig-paren">(</span><em>new_exprs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Lookup.set_source_expressions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Transform">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Transform</code><span class="sig-paren">(</span><em>) is first so that get_lookup() and get_transform(</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Transform" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.query_utils.RegisterLookupMixin</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.expressions.Func</span></code></p>
<p>first examine self and then check output_field.</p>
<dl class="attribute">
<dt id="djongo.models.Transform.arity">
<code class="descname">arity</code><em class="property"> = 1</em><a class="headerlink" href="#djongo.models.Transform.arity" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Transform.bilateral">
<code class="descname">bilateral</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.Transform.bilateral" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Transform.get_bilateral_transforms">
<code class="descname">get_bilateral_transforms</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Transform.get_bilateral_transforms" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Transform.lhs">
<code class="descname">lhs</code><a class="headerlink" href="#djongo.models.Transform.lhs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Manager">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Manager</code><a class="headerlink" href="#djongo.models.Manager" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.manager.BaseManagerFromQuerySet</span></code></p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.Prefetch">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Prefetch</code><span class="sig-paren">(</span><em>lookup</em>, <em>queryset=None</em>, <em>to_attr=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Prefetch" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="method">
<dt id="djongo.models.Prefetch.add_prefix">
<code class="descname">add_prefix</code><span class="sig-paren">(</span><em>prefix</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Prefetch.add_prefix" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Prefetch.get_current_prefetch_to">
<code class="descname">get_current_prefetch_to</code><span class="sig-paren">(</span><em>level</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Prefetch.get_current_prefetch_to" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Prefetch.get_current_queryset">
<code class="descname">get_current_queryset</code><span class="sig-paren">(</span><em>level</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Prefetch.get_current_queryset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Prefetch.get_current_to_attr">
<code class="descname">get_current_to_attr</code><span class="sig-paren">(</span><em>level</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Prefetch.get_current_to_attr" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.Q">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Q</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Q" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.utils.tree.Node</span></code></p>
<p>Encapsulate filters as objects that can then be combined logically (using
<cite>&amp;</cite> and <cite>|</cite>).</p>
<dl class="attribute">
<dt id="djongo.models.Q.AND">
<code class="descname">AND</code><em class="property"> = 'AND'</em><a class="headerlink" href="#djongo.models.Q.AND" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Q.OR">
<code class="descname">OR</code><em class="property"> = 'OR'</em><a class="headerlink" href="#djongo.models.Q.OR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Q.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Q.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.Q.default">
<code class="descname">default</code><em class="property"> = 'AND'</em><a class="headerlink" href="#djongo.models.Q.default" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Q.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>query=None</em>, <em>allow_joins=True</em>, <em>reuse=None</em>, <em>summarize=False</em>, <em>for_save=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Q.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.QuerySet">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">QuerySet</code><span class="sig-paren">(</span><em>model=None</em>, <em>query=None</em>, <em>using=None</em>, <em>hints=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Represent a lazy database lookup for a set of objects.</p>
<dl class="method">
<dt id="djongo.models.QuerySet.aggregate">
<code class="descname">aggregate</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.aggregate" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dictionary containing the calculations (aggregation)
over the current queryset.</p>
<p>If args is present the expression is passed as a kwarg using
the Aggregate object’s default alias.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.all">
<code class="descname">all</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.all" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet that is a copy of the current one. This allows a
QuerySet to proxy for a model manager in some cases.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.annotate">
<code class="descname">annotate</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.annotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a query set in which the returned objects have been annotated
with extra data or aggregations.</p>
</dd></dl>

<dl class="classmethod">
<dt id="djongo.models.QuerySet.as_manager">
<em class="property">classmethod </em><code class="descname">as_manager</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.as_manager" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.bulk_create">
<code class="descname">bulk_create</code><span class="sig-paren">(</span><em>objs</em>, <em>batch_size=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.bulk_create" title="Permalink to this definition">¶</a></dt>
<dd><p>Insert each of the instances into the database. Do <em>not</em> call
save() on each of the instances, do not send any pre/post_save
signals, and do not set the primary key attribute if it is an
autoincrement field (except if features.can_return_ids_from_bulk_insert=True).
Multi-table models are not supported.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.complex_filter">
<code class="descname">complex_filter</code><span class="sig-paren">(</span><em>filter_obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.complex_filter" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance with filter_obj added to the filters.</p>
<p>filter_obj can be a Q object or a dictionary of keyword lookup
arguments.</p>
<p>This exists to support framework features such as ‘limit_choices_to’,
and usually it will be more natural to use other methods.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.count">
<code class="descname">count</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.count" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform a SELECT COUNT() and return the number of records as an
integer.</p>
<p>If the QuerySet is already fully cached, return the length of the
cached results set to avoid multiple SELECT COUNT(*) calls.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.create">
<code class="descname">create</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new object with the given kwargs, saving it to the database
and returning the created object.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.dates">
<code class="descname">dates</code><span class="sig-paren">(</span><em>field_name</em>, <em>kind</em>, <em>order='ASC'</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.dates" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of date objects representing all available dates for
the given field_name, scoped to ‘kind’.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.datetimes">
<code class="descname">datetimes</code><span class="sig-paren">(</span><em>field_name</em>, <em>kind</em>, <em>order='ASC'</em>, <em>tzinfo=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.datetimes" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of datetime objects representing all available
datetimes for the given field_name, scoped to ‘kind’.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.QuerySet.db">
<code class="descname">db</code><a class="headerlink" href="#djongo.models.QuerySet.db" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the database used if this query is executed now.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.defer">
<code class="descname">defer</code><span class="sig-paren">(</span><em>*fields</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.defer" title="Permalink to this definition">¶</a></dt>
<dd><p>Defer the loading of data for certain fields until they are accessed.
Add the set of deferred fields to any existing set of deferred fields.
The only exception to this is if None is passed in as the only
parameter, in which case removal all deferrals.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.delete">
<code class="descname">delete</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.delete" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the records in the current QuerySet.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.difference">
<code class="descname">difference</code><span class="sig-paren">(</span><em>*other_qs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.difference" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.distinct">
<code class="descname">distinct</code><span class="sig-paren">(</span><em>*field_names</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.distinct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance that will select only distinct results.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.earliest">
<code class="descname">earliest</code><span class="sig-paren">(</span><em>*fields</em>, <em>field_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.earliest" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.exclude">
<code class="descname">exclude</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.exclude" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance with NOT (args) ANDed to the existing
set.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.exists">
<code class="descname">exists</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.exists" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.extra">
<code class="descname">extra</code><span class="sig-paren">(</span><em>select=None</em>, <em>where=None</em>, <em>params=None</em>, <em>tables=None</em>, <em>order_by=None</em>, <em>select_params=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.extra" title="Permalink to this definition">¶</a></dt>
<dd><p>Add extra SQL fragments to the query.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.filter">
<code class="descname">filter</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.filter" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance with the args ANDed to the existing
set.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.first">
<code class="descname">first</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.first" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the first object of a query or None if no match is found.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.get">
<code class="descname">get</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform the query and return a single object matching the given
keyword arguments.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.get_or_create">
<code class="descname">get_or_create</code><span class="sig-paren">(</span><em>defaults=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.get_or_create" title="Permalink to this definition">¶</a></dt>
<dd><p>Look up an object with the given kwargs, creating one if necessary.
Return a tuple of (object, created), where created is a boolean
specifying whether an object was created.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.in_bulk">
<code class="descname">in_bulk</code><span class="sig-paren">(</span><em>id_list=None</em>, <em>*</em>, <em>field_name='pk'</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.in_bulk" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dictionary mapping each of the given IDs to the object with
that ID. If <cite>id_list</cite> isn’t provided, evaluate the entire QuerySet.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.intersection">
<code class="descname">intersection</code><span class="sig-paren">(</span><em>*other_qs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.intersection" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.iterator">
<code class="descname">iterator</code><span class="sig-paren">(</span><em>chunk_size=2000</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.iterator" title="Permalink to this definition">¶</a></dt>
<dd><p>An iterator over the results from applying this QuerySet to the
database.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.last">
<code class="descname">last</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.last" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the last object of a query or None if no match is found.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.latest">
<code class="descname">latest</code><span class="sig-paren">(</span><em>*fields</em>, <em>field_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.latest" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.none">
<code class="descname">none</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.none" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an empty QuerySet.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.only">
<code class="descname">only</code><span class="sig-paren">(</span><em>*fields</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.only" title="Permalink to this definition">¶</a></dt>
<dd><p>Essentially, the opposite of defer(). Only the fields passed into this
method and that are not already specified as deferred are loaded
immediately when the queryset is evaluated.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.order_by">
<code class="descname">order_by</code><span class="sig-paren">(</span><em>*field_names</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.order_by" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance with the ordering changed.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.QuerySet.ordered">
<code class="descname">ordered</code><a class="headerlink" href="#djongo.models.QuerySet.ordered" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if the QuerySet is ordered – i.e. has an order_by()
clause or a default ordering on the model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.prefetch_related">
<code class="descname">prefetch_related</code><span class="sig-paren">(</span><em>*lookups</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.prefetch_related" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance that will prefetch the specified
Many-To-One and Many-To-Many related objects when the QuerySet is
evaluated.</p>
<p>When prefetch_related() is called more than once, append to the list of
prefetch lookups. If prefetch_related(None) is called, clear the list.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.raw">
<code class="descname">raw</code><span class="sig-paren">(</span><em>raw_query</em>, <em>params=None</em>, <em>translations=None</em>, <em>using=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.raw" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.reverse">
<code class="descname">reverse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.reverse" title="Permalink to this definition">¶</a></dt>
<dd><p>Reverse the ordering of the QuerySet.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.select_for_update">
<code class="descname">select_for_update</code><span class="sig-paren">(</span><em>nowait=False</em>, <em>skip_locked=False</em>, <em>of=()</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.select_for_update" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance that will select objects with a
FOR UPDATE lock.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.select_related">
<code class="descname">select_related</code><span class="sig-paren">(</span><em>*fields</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.select_related" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a new QuerySet instance that will select related objects.</p>
<p>If fields are specified, they must be ForeignKey fields and only those
related objects are included in the selection.</p>
<p>If select_related(None) is called, clear the list.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.union">
<code class="descname">union</code><span class="sig-paren">(</span><em>*other_qs</em>, <em>all=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.union" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.update">
<code class="descname">update</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Update all elements in the current QuerySet, setting all the given
fields to the appropriate values.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.update_or_create">
<code class="descname">update_or_create</code><span class="sig-paren">(</span><em>defaults=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.update_or_create" title="Permalink to this definition">¶</a></dt>
<dd><p>Look up an object with the given kwargs, updating one with defaults
if it exists, otherwise create a new one.
Return a tuple (object, created), where created is a boolean
specifying whether an object was created.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.using">
<code class="descname">using</code><span class="sig-paren">(</span><em>alias</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.using" title="Permalink to this definition">¶</a></dt>
<dd><p>Select which database this QuerySet should execute against.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.values">
<code class="descname">values</code><span class="sig-paren">(</span><em>*fields</em>, <em>**expressions</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.values" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.QuerySet.values_list">
<code class="descname">values_list</code><span class="sig-paren">(</span><em>*fields</em>, <em>flat=False</em>, <em>named=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.QuerySet.values_list" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="djongo.models.prefetch_related_objects">
<code class="descclassname">djongo.models.</code><code class="descname">prefetch_related_objects</code><span class="sig-paren">(</span><em>model_instances</em>, <em>*related_lookups</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.prefetch_related_objects" title="Permalink to this definition">¶</a></dt>
<dd><p>Populate prefetched object caches for a list of model instances based on
the lookups/Prefetch instances given.</p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.Model">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">Model</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="classmethod">
<dt id="djongo.models.Model.check">
<em class="property">classmethod </em><code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Model.clean">
<code class="descname">clean</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.clean" title="Permalink to this definition">¶</a></dt>
<dd><p>Hook for doing any extra model-wide validation after clean() has been
called on every field by self.clean_fields. Any ValidationError raised
by this method will not be associated with a particular field; it will
have a special-case association with the field defined by NON_FIELD_ERRORS.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Model.clean_fields">
<code class="descname">clean_fields</code><span class="sig-paren">(</span><em>exclude=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.clean_fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Clean all fields and raise a ValidationError containing a dict
of all validation errors if any occur.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Model.date_error_message">
<code class="descname">date_error_message</code><span class="sig-paren">(</span><em>lookup_type</em>, <em>field_name</em>, <em>unique_for</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.date_error_message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Model.delete">
<code class="descname">delete</code><span class="sig-paren">(</span><em>using=None</em>, <em>keep_parents=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.delete" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="djongo.models.Model.from_db">
<em class="property">classmethod </em><code class="descname">from_db</code><span class="sig-paren">(</span><em>db</em>, <em>field_names</em>, <em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.from_db" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Model.full_clean">
<code class="descname">full_clean</code><span class="sig-paren">(</span><em>exclude=None</em>, <em>validate_unique=True</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.full_clean" title="Permalink to this definition">¶</a></dt>
<dd><p>Call clean_fields(), clean(), and validate_unique() on the model.
Raise a ValidationError for any errors that occur.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Model.get_deferred_fields">
<code class="descname">get_deferred_fields</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.get_deferred_fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a set containing names of deferred fields for this instance.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.Model.pk">
<code class="descname">pk</code><a class="headerlink" href="#djongo.models.Model.pk" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Model.prepare_database_save">
<code class="descname">prepare_database_save</code><span class="sig-paren">(</span><em>field</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.prepare_database_save" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Model.refresh_from_db">
<code class="descname">refresh_from_db</code><span class="sig-paren">(</span><em>using=None</em>, <em>fields=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.refresh_from_db" title="Permalink to this definition">¶</a></dt>
<dd><p>Reload field values from the database.</p>
<p>By default, the reloading happens from the database this instance was
loaded from, or by the read router if this instance wasn’t loaded from
any database. The using parameter will override the default.</p>
<p>Fields can be used to specify which fields to reload. The fields
should be an iterable of field attnames. If fields is None, then
all non-deferred fields are reloaded.</p>
<p>When accessing deferred fields of an instance, the deferred loading
of the field will call this method.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Model.save">
<code class="descname">save</code><span class="sig-paren">(</span><em>force_insert=False</em>, <em>force_update=False</em>, <em>using=None</em>, <em>update_fields=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.save" title="Permalink to this definition">¶</a></dt>
<dd><p>Save the current instance. Override this in a subclass if you want to
control the saving process.</p>
<p>The ‘force_insert’ and ‘force_update’ parameters can be used to insist
that the “save” must be an SQL insert or update (or equivalent for
non-SQL backends), respectively. Normally, they should not be set.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Model.save_base">
<code class="descname">save_base</code><span class="sig-paren">(</span><em>raw=False</em>, <em>force_insert=False</em>, <em>force_update=False</em>, <em>using=None</em>, <em>update_fields=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.save_base" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle the parts of saving which should be done only once per save,
yet need to be done in raw saves, too. This includes some sanity
checks and signal sending.</p>
<p>The ‘raw’ argument is telling save_base not to save any parent
models and not to do any changes to the values before save. This
is used by fixture loading.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Model.serializable_value">
<code class="descname">serializable_value</code><span class="sig-paren">(</span><em>field_name</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.serializable_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the value of the field name for this instance. If the field is
a foreign key, return the id value instead of the object. If there’s
no Field object with this name on the model, return the model
attribute’s value.</p>
<p>Used to serialize a field’s value (in the serializer, or form output,
for example). Normally, you would just access the attribute directly
and not use this method.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.Model.unique_error_message">
<code class="descname">unique_error_message</code><span class="sig-paren">(</span><em>model_class</em>, <em>unique_check</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.unique_error_message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.Model.validate_unique">
<code class="descname">validate_unique</code><span class="sig-paren">(</span><em>exclude=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.Model.validate_unique" title="Permalink to this definition">¶</a></dt>
<dd><p>Check unique constraints on the model and raise ValidationError if any
failed.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.FilteredRelation">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">FilteredRelation</code><span class="sig-paren">(</span><em>relation_name</em>, <em>*</em>, <em>condition=&lt;Q: (AND: )&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilteredRelation" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Specify custom filtering in the ON clause of SQL joins.</p>
<dl class="method">
<dt id="djongo.models.FilteredRelation.as_sql">
<code class="descname">as_sql</code><span class="sig-paren">(</span><em>compiler</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilteredRelation.as_sql" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FilteredRelation.clone">
<code class="descname">clone</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilteredRelation.clone" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.FilteredRelation.resolve_expression">
<code class="descname">resolve_expression</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.FilteredRelation.resolve_expression" title="Permalink to this definition">¶</a></dt>
<dd><p>QuerySet.annotate() only accepts expression-like arguments
(with a resolve_expression() method).</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ForeignKey">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ForeignKey</code><span class="sig-paren">(</span><em>to</em>, <em>on_delete</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>parent_link=False</em>, <em>to_field=None</em>, <em>db_constraint=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related.ForeignObject</span></code></p>
<p>Provide a many-to-one relation by adding a column to the local model
to hold the remote value.</p>
<p>By default ForeignKey will target the pk of the remote model but this
behavior can be changed by using the <code class="docutils literal notranslate"><span class="pre">to_field</span></code> argument.</p>
<dl class="method">
<dt id="djongo.models.ForeignKey.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.contribute_to_related_class">
<code class="descname">contribute_to_related_class</code><span class="sig-paren">(</span><em>cls</em>, <em>related</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.contribute_to_related_class" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.convert_empty_strings">
<code class="descname">convert_empty_strings</code><span class="sig-paren">(</span><em>value</em>, <em>expression</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.convert_empty_strings" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.db_check">
<code class="descname">db_check</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.db_check" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the database column check constraint for this field, for the
provided connection. Works the same way as db_type() for the case that
get_internal_type() does not map to a preexisting model field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.db_parameters">
<code class="descname">db_parameters</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.db_parameters" title="Permalink to this definition">¶</a></dt>
<dd><p>Extension of db_type(), providing a range of different return values
(type, checks). This will look at db_type(), allowing custom model
fields to override it.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.db_type">
<code class="descname">db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the database column data type for this field, for the provided
connection.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.default_error_messages">
<code class="descname">default_error_messages</code><em class="property"> = {'invalid': '%(model)s instance with %(field)s %(value)r does not exist.'}</em><a class="headerlink" href="#djongo.models.ForeignKey.default_error_messages" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.description">
<code class="descname">description</code><em class="property"> = 'Foreign Key (type determined by related field)'</em><a class="headerlink" href="#djongo.models.ForeignKey.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ForeignKey.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>*</em>, <em>using=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass <code class="docutils literal notranslate"><span class="pre">limit_choices_to</span></code> to the field being constructed.</p>
<p>Only passes it if there is a type that supports related fields.
This is a similar strategy used to pass the <code class="docutils literal notranslate"><span class="pre">queryset</span></code> to the field
being constructed.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_attname">
<code class="descname">get_attname</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_attname" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_attname_column">
<code class="descname">get_attname_column</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_attname_column" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_col">
<code class="descname">get_col</code><span class="sig-paren">(</span><em>alias</em>, <em>output_field=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_col" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_db_converters">
<code class="descname">get_db_converters</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_db_converters" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_db_prep_save">
<code class="descname">get_db_prep_save</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_db_prep_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for saving into a database.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_default">
<code class="descname">get_default</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_default" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the to_field if the default value is an object.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.get_reverse_path_info">
<code class="descname">get_reverse_path_info</code><span class="sig-paren">(</span><em>filtered_relation=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.get_reverse_path_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Get path from the related model to this field’s model.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.many_to_many">
<code class="descname">many_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ForeignKey.many_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.many_to_one">
<code class="descname">many_to_one</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.ForeignKey.many_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.one_to_many">
<code class="descname">one_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ForeignKey.one_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.one_to_one">
<code class="descname">one_to_one</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ForeignKey.one_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.rel_class">
<code class="descname">rel_class</code><a class="headerlink" href="#djongo.models.ForeignKey.rel_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.reverse_related.ManyToOneRel</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignKey.target_field">
<code class="descname">target_field</code><a class="headerlink" href="#djongo.models.ForeignKey.target_field" title="Permalink to this definition">¶</a></dt>
<dd><p>When filtering against this relation, return the field on the remote
model against which the filtering should happen.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignKey.validate">
<code class="descname">validate</code><span class="sig-paren">(</span><em>value</em>, <em>model_instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignKey.validate" title="Permalink to this definition">¶</a></dt>
<dd><p>Validate value and raise ValidationError if necessary. Subclasses
should override this to provide validation logic.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ForeignObject">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ForeignObject</code><span class="sig-paren">(</span><em>to</em>, <em>on_delete</em>, <em>from_fields</em>, <em>to_fields</em>, <em>rel=None</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>parent_link=False</em>, <em>swappable=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related.RelatedField</span></code></p>
<p>Abstraction of the ForeignKey relation to support multi-column relations.</p>
<dl class="method">
<dt id="djongo.models.ForeignObject.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.class_lookups">
<code class="descname">class_lookups</code><em class="property"> = {'exact': &lt;class 'django.db.models.fields.related_lookups.RelatedExact'&gt;, 'gt': &lt;class 'django.db.models.fields.related_lookups.RelatedGreaterThan'&gt;, 'gte': &lt;class 'django.db.models.fields.related_lookups.RelatedGreaterThanOrEqual'&gt;, 'in': &lt;class 'django.db.models.fields.related_lookups.RelatedIn'&gt;, 'isnull': &lt;class 'django.db.models.fields.related_lookups.RelatedIsNull'&gt;, 'lt': &lt;class 'django.db.models.fields.related_lookups.RelatedLessThan'&gt;, 'lte': &lt;class 'django.db.models.fields.related_lookups.RelatedLessThanOrEqual'&gt;}</em><a class="headerlink" href="#djongo.models.ForeignObject.class_lookups" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.contribute_to_class">
<code class="descname">contribute_to_class</code><span class="sig-paren">(</span><em>cls</em>, <em>name</em>, <em>private_only=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.contribute_to_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Register the field with the model class it belongs to.</p>
<p>If private_only is True, create a separate instance of this field
for every subclass of cls, even if cls is not an abstract model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.contribute_to_related_class">
<code class="descname">contribute_to_related_class</code><span class="sig-paren">(</span><em>cls</em>, <em>related</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.contribute_to_related_class" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.foreign_related_fields">
<code class="descname">foreign_related_fields</code><a class="headerlink" href="#djongo.models.ForeignObject.foreign_related_fields" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.forward_related_accessor_class">
<code class="descname">forward_related_accessor_class</code><a class="headerlink" href="#djongo.models.ForeignObject.forward_related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related_descriptors.ForwardManyToOneDescriptor</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_attname_column">
<code class="descname">get_attname_column</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_attname_column" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_extra_descriptor_filter">
<code class="descname">get_extra_descriptor_filter</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_extra_descriptor_filter" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an extra filter condition for related object fetching when
user does ‘instance.fieldname’, that is the extra filter is used in
the descriptor of the field.</p>
<p>The filter should be either a dict usable in .filter(<a href="#id61"><span class="problematic" id="id62">**</span></a>kwargs) call or
a Q-object. The condition will be ANDed together with the relation’s
joining columns.</p>
<p>A parallel method is get_extra_restriction() which is used in
JOIN and subquery conditions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_extra_restriction">
<code class="descname">get_extra_restriction</code><span class="sig-paren">(</span><em>where_class</em>, <em>alias</em>, <em>related_alias</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_extra_restriction" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a pair condition used for joining and subquery pushdown. The
condition is something that responds to as_sql(compiler, connection)
method.</p>
<p>Note that currently referring both the ‘alias’ and ‘related_alias’
will not work in some conditions, like subquery pushdown.</p>
<p>A parallel method is get_extra_descriptor_filter() which is used in
instance.fieldname related object fetching.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_foreign_related_value">
<code class="descname">get_foreign_related_value</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_foreign_related_value" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="djongo.models.ForeignObject.get_instance_value_for_fields">
<em class="property">static </em><code class="descname">get_instance_value_for_fields</code><span class="sig-paren">(</span><em>fields</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_instance_value_for_fields" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_joining_columns">
<code class="descname">get_joining_columns</code><span class="sig-paren">(</span><em>reverse_join=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_joining_columns" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_local_related_value">
<code class="descname">get_local_related_value</code><span class="sig-paren">(</span><em>instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_local_related_value" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="classmethod">
<dt id="djongo.models.ForeignObject.get_lookups">
<em class="property">classmethod </em><code class="descname">get_lookups</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_lookups" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_path_info">
<code class="descname">get_path_info</code><span class="sig-paren">(</span><em>filtered_relation=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_path_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Get path from this field to the related model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_reverse_joining_columns">
<code class="descname">get_reverse_joining_columns</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_reverse_joining_columns" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.get_reverse_path_info">
<code class="descname">get_reverse_path_info</code><span class="sig-paren">(</span><em>filtered_relation=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.get_reverse_path_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Get path from the related model to this field’s model.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.local_related_fields">
<code class="descname">local_related_fields</code><a class="headerlink" href="#djongo.models.ForeignObject.local_related_fields" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.many_to_many">
<code class="descname">many_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ForeignObject.many_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.many_to_one">
<code class="descname">many_to_one</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.ForeignObject.many_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.one_to_many">
<code class="descname">one_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ForeignObject.one_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.one_to_one">
<code class="descname">one_to_one</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ForeignObject.one_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.rel_class">
<code class="descname">rel_class</code><a class="headerlink" href="#djongo.models.ForeignObject.rel_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.reverse_related.ForeignObjectRel</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.related_accessor_class">
<code class="descname">related_accessor_class</code><a class="headerlink" href="#djongo.models.ForeignObject.related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related_descriptors.ReverseManyToOneDescriptor</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.related_fields">
<code class="descname">related_fields</code><a class="headerlink" href="#djongo.models.ForeignObject.related_fields" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.requires_unique_target">
<code class="descname">requires_unique_target</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.ForeignObject.requires_unique_target" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ForeignObject.resolve_related_fields">
<code class="descname">resolve_related_fields</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ForeignObject.resolve_related_fields" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ForeignObject.reverse_related_fields">
<code class="descname">reverse_related_fields</code><a class="headerlink" href="#djongo.models.ForeignObject.reverse_related_fields" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.OneToOneField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">OneToOneField</code><span class="sig-paren">(</span><em>to</em>, <em>on_delete</em>, <em>to_field=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OneToOneField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related.ForeignKey</span></code></p>
<p>A OneToOneField is essentially the same as a ForeignKey, with the exception
that it always carries a “unique” constraint with it and the reverse
relation always returns the object pointed to (since there will only ever
be one), rather than returning a list.</p>
<dl class="method">
<dt id="djongo.models.OneToOneField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OneToOneField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.description">
<code class="descname">description</code><em class="property"> = 'One-to-one relationship'</em><a class="headerlink" href="#djongo.models.OneToOneField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.OneToOneField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OneToOneField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass <code class="docutils literal notranslate"><span class="pre">limit_choices_to</span></code> to the field being constructed.</p>
<p>Only passes it if there is a type that supports related fields.
This is a similar strategy used to pass the <code class="docutils literal notranslate"><span class="pre">queryset</span></code> to the field
being constructed.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.forward_related_accessor_class">
<code class="descname">forward_related_accessor_class</code><a class="headerlink" href="#djongo.models.OneToOneField.forward_related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related_descriptors.ForwardOneToOneDescriptor</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.many_to_many">
<code class="descname">many_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.OneToOneField.many_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.many_to_one">
<code class="descname">many_to_one</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.OneToOneField.many_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.one_to_many">
<code class="descname">one_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.OneToOneField.one_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.one_to_one">
<code class="descname">one_to_one</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.OneToOneField.one_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.rel_class">
<code class="descname">rel_class</code><a class="headerlink" href="#djongo.models.OneToOneField.rel_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.reverse_related.OneToOneRel</span></code></p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.OneToOneField.related_accessor_class">
<code class="descname">related_accessor_class</code><a class="headerlink" href="#djongo.models.OneToOneField.related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related_descriptors.ReverseOneToOneDescriptor</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.OneToOneField.save_form_data">
<code class="descname">save_form_data</code><span class="sig-paren">(</span><em>instance</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OneToOneField.save_form_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ManyToManyField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ManyToManyField</code><span class="sig-paren">(</span><em>to</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>symmetrical=None</em>, <em>through=None</em>, <em>through_fields=None</em>, <em>db_constraint=True</em>, <em>db_table=None</em>, <em>swappable=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related.RelatedField</span></code></p>
<p>Provide a many-to-many relation by using an intermediary model that
holds two ForeignKey fields pointed at the two sides of the relation.</p>
<p>Unless a <code class="docutils literal notranslate"><span class="pre">through</span></code> model was provided, ManyToManyField will use the
create_many_to_many_intermediary_model factory to automatically generate
the intermediary model.</p>
<dl class="method">
<dt id="djongo.models.ManyToManyField.check">
<code class="descname">check</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.check" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.contribute_to_class">
<code class="descname">contribute_to_class</code><span class="sig-paren">(</span><em>cls</em>, <em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.contribute_to_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Register the field with the model class it belongs to.</p>
<p>If private_only is True, create a separate instance of this field
for every subclass of cls, even if cls is not an abstract model.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.contribute_to_related_class">
<code class="descname">contribute_to_related_class</code><span class="sig-paren">(</span><em>cls</em>, <em>related</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.contribute_to_related_class" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.db_check">
<code class="descname">db_check</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.db_check" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the database column check constraint for this field, for the
provided connection. Works the same way as db_type() for the case that
get_internal_type() does not map to a preexisting model field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.db_parameters">
<code class="descname">db_parameters</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.db_parameters" title="Permalink to this definition">¶</a></dt>
<dd><p>Extension of db_type(), providing a range of different return values
(type, checks). This will look at db_type(), allowing custom model
fields to override it.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.db_type">
<code class="descname">db_type</code><span class="sig-paren">(</span><em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.db_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the database column data type for this field, for the provided
connection.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ManyToManyField.description">
<code class="descname">description</code><em class="property"> = 'Many-to-many relationship'</em><a class="headerlink" href="#djongo.models.ManyToManyField.description" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>*</em>, <em>using=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Pass <code class="docutils literal notranslate"><span class="pre">limit_choices_to</span></code> to the field being constructed.</p>
<p>Only passes it if there is a type that supports related fields.
This is a similar strategy used to pass the <code class="docutils literal notranslate"><span class="pre">queryset</span></code> to the field
being constructed.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.get_path_info">
<code class="descname">get_path_info</code><span class="sig-paren">(</span><em>filtered_relation=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.get_path_info" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.get_reverse_path_info">
<code class="descname">get_reverse_path_info</code><span class="sig-paren">(</span><em>filtered_relation=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.get_reverse_path_info" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ManyToManyField.many_to_many">
<code class="descname">many_to_many</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.ManyToManyField.many_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ManyToManyField.many_to_one">
<code class="descname">many_to_one</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ManyToManyField.many_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ManyToManyField.one_to_many">
<code class="descname">one_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ManyToManyField.one_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ManyToManyField.one_to_one">
<code class="descname">one_to_one</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ManyToManyField.one_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ManyToManyField.rel_class">
<code class="descname">rel_class</code><a class="headerlink" href="#djongo.models.ManyToManyField.rel_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.reverse_related.ManyToManyRel</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.save_form_data">
<code class="descname">save_form_data</code><span class="sig-paren">(</span><em>instance</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.save_form_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.set_attributes_from_rel">
<code class="descname">set_attributes_from_rel</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.set_attributes_from_rel" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToManyField.value_from_object">
<code class="descname">value_from_object</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyField.value_from_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the value of this field in the given model instance.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ManyToOneRel">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ManyToOneRel</code><span class="sig-paren">(</span><em>field</em>, <em>to</em>, <em>field_name</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>parent_link=False</em>, <em>on_delete=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToOneRel" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.reverse_related.ForeignObjectRel</span></code></p>
<p>Used by the ForeignKey field to store information about the relation.</p>
<p><code class="docutils literal notranslate"><span class="pre">_meta.get_fields()</span></code> returns this class to provide access to the field
flags for the reverse relation.</p>
<p>Note: Because we somewhat abuse the Rel objects by using them as reverse
fields we get the funny situation where
<code class="docutils literal notranslate"><span class="pre">ManyToOneRel.many_to_one</span> <span class="pre">==</span> <span class="pre">False</span></code> and
<code class="docutils literal notranslate"><span class="pre">ManyToOneRel.one_to_many</span> <span class="pre">==</span> <span class="pre">True</span></code>. This is unfortunate but the actual
ManyToOneRel class is a private API and there is work underway to turn
reverse relations into actual fields.</p>
<dl class="method">
<dt id="djongo.models.ManyToOneRel.get_related_field">
<code class="descname">get_related_field</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToOneRel.get_related_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the Field in the ‘to’ object to which this relationship is tied.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ManyToOneRel.set_field_name">
<code class="descname">set_field_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToOneRel.set_field_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the related field’s name, this is not available until later stages
of app loading, so set_field_name is called from
set_attributes_from_rel()</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ManyToManyRel">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ManyToManyRel</code><span class="sig-paren">(</span><em>field</em>, <em>to</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>symmetrical=True</em>, <em>through=None</em>, <em>through_fields=None</em>, <em>db_constraint=True</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyRel" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.reverse_related.ForeignObjectRel</span></code></p>
<p>Used by ManyToManyField to store information about the relation.</p>
<p><code class="docutils literal notranslate"><span class="pre">_meta.get_fields()</span></code> returns this class to provide access to the field
flags for the reverse relation.</p>
<dl class="method">
<dt id="djongo.models.ManyToManyRel.get_related_field">
<code class="descname">get_related_field</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ManyToManyRel.get_related_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the field in the ‘to’ object to which this relationship is tied.
Provided for symmetry with ManyToOneRel.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.OneToOneRel">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">OneToOneRel</code><span class="sig-paren">(</span><em>field</em>, <em>to</em>, <em>field_name</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>parent_link=False</em>, <em>on_delete=None</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.OneToOneRel" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.reverse_related.ManyToOneRel</span></code></p>
<p>Used by OneToOneField to store information about the relation.</p>
<p><code class="docutils literal notranslate"><span class="pre">_meta.get_fields()</span></code> returns this class to provide access to the field
flags for the reverse relation.</p>
</dd></dl>

<dl class="function">
<dt id="djongo.models.permalink">
<code class="descclassname">djongo.models.</code><code class="descname">permalink</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.permalink" title="Permalink to this definition">¶</a></dt>
<dd><p>Decorator that calls urls.reverse() to return a URL using parameters
returned by the decorated function “func”.</p>
<p>“func” should be a function that returns a tuple in one of the
following formats:</p>
<blockquote>
<div>(viewname, viewargs)
(viewname, viewargs, viewkwargs)</div></blockquote>
</dd></dl>

<dl class="class">
<dt id="djongo.models.DjongoManager">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">DjongoManager</code><a class="headerlink" href="#djongo.models.DjongoManager" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.manager.Manager</span></code></p>
<p>This modified manager allows to issue Mongo functions by prefixing
them with ‘<a href="#id85"><span class="problematic" id="id86">mongo_</span></a>’.</p>
<p>This module allows methods to be passed directly to pymongo.</p>
</dd></dl>

<dl class="class">
<dt id="djongo.models.ListField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ListField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ListField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<p>MongoDB allows the saving of arbitrary data inside it’s embedded array. The <cite>ListField</cite> is useful in such cases.</p>
<dl class="attribute">
<dt id="djongo.models.ListField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ListField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ListField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ListField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ArrayModelField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ArrayModelField</code><span class="sig-paren">(</span><em>model_container: Type[django.db.models.base.Model], model_form_class: Type[django.forms.models.ModelForm] = None, model_form_kwargs_l: dict = None, *args, **kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayModelField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<p>Implements an array of objects inside the document.</p>
<p>The allowed object type is defined on model declaration. The
declared instance will accept a python list of instances of the
given model as its contents.</p>
<p>The model of the container must be declared as abstract, thus should
not be treated as a collection of its own.</p>
<p>Example:</p>
<dl class="docutils">
<dt>class Author(models.Model):</dt>
<dd><p class="first">name = models.CharField(max_length=100)
email = models.CharField(max_length=100)</p>
<dl class="last docutils">
<dt>class Meta:</dt>
<dd>abstract = True</dd>
</dl>
</dd>
<dt>class AuthorForm(forms.ModelForm):</dt>
<dd><dl class="first last docutils">
<dt>class Meta:</dt>
<dd><p class="first">model = Author
fields = (</p>
<blockquote>
<div>‘name’, ‘email’</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
</dd>
<dt>class MultipleBlogPosts(models.Model):</dt>
<dd><p class="first">h1 = models.CharField(max_length=100)
content = models.ArrayModelField(</p>
<blockquote>
<div>model_container=BlogContent,
model_form_class=BlogContentForm</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
<dl class="method">
<dt id="djongo.models.ArrayModelField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayModelField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ArrayModelField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ArrayModelField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ArrayModelField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayModelField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the formfield for the array.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ArrayModelField.from_db_value">
<code class="descname">from_db_value</code><span class="sig-paren">(</span><em>value</em>, <em>expression</em>, <em>connection</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayModelField.from_db_value" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.ArrayModelField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayModelField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ArrayModelField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayModelField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Overrides standard to_python method from django models to allow
correct translation of Mongo array to a python list.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ArrayModelField.validate">
<code class="descname">validate</code><span class="sig-paren">(</span><em>value</em>, <em>model_instance</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayModelField.validate" title="Permalink to this definition">¶</a></dt>
<dd><p>Validate value and raise ValidationError if necessary. Subclasses
should override this to provide validation logic.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.EmbeddedModelField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">EmbeddedModelField</code><span class="sig-paren">(</span><em>model_container: Type[django.db.models.base.Model], model_form_class: Type[django.forms.models.ModelForm] = None, model_form_kwargs: dict = None, *args, **kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmbeddedModelField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.Field</span></code></p>
<p>Allows for the inclusion of an instance of an abstract model as
a field inside a document.</p>
<p>Example:</p>
<dl class="docutils">
<dt>class Author(models.Model):</dt>
<dd><p class="first">name = models.CharField(max_length=100)
email = models.CharField(max_length=100)</p>
<dl class="last docutils">
<dt>class Meta:</dt>
<dd>abstract = True</dd>
</dl>
</dd>
<dt>class AuthorForm(forms.ModelForm):</dt>
<dd><dl class="first last docutils">
<dt>class Meta:</dt>
<dd><p class="first">model = Author
fields = (</p>
<blockquote>
<div>‘name’, ‘email’</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
</dd>
<dt>class MultipleBlogPosts(models.Model):</dt>
<dd><p class="first">h1 = models.CharField(max_length=100)
content = models.ArrayModelField(</p>
<blockquote>
<div>model_container=BlogContent,
model_form_class=BlogContentForm</div></blockquote>
<p class="last">)</p>
</dd>
</dl>
<dl class="method">
<dt id="djongo.models.EmbeddedModelField.deconstruct">
<code class="descname">deconstruct</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmbeddedModelField.deconstruct" title="Permalink to this definition">¶</a></dt>
<dd><p>Return enough information to recreate the field as a 4-tuple:</p>
<blockquote>
<div><ul class="simple">
<li>The name of the field on the model, if contribute_to_class() has
been run.</li>
<li>The import path of the field, including the class:e.g.
django.db.models.IntegerField This should be the most portable
version, so less specific may be better.</li>
<li>A list of positional arguments.</li>
<li>A dict of keyword arguments.</li>
</ul>
</div></blockquote>
<p>Note that the positional or keyword arguments must contain values of
the following types (including inner values of collection types):</p>
<blockquote>
<div><ul class="simple">
<li>None, bool, str, int, float, complex, set, frozenset, list, tuple,
dict</li>
<li>UUID</li>
<li>datetime.datetime (naive), datetime.date</li>
<li>top-level classes, top-level functions - will be referenced by their
full import path</li>
<li>Storage instances - these have their own deconstruct() method</li>
</ul>
</div></blockquote>
<p>This is because the values here must be serialized into a text format
(possibly new Python code, possibly JSON) and these are the only types
with encoding handlers defined.</p>
<p>There’s no need to return the exact way the field was instantiated this
time, just ensure that the resulting field is the same - prefer keyword
arguments over positional ones, and omit parameters with their default
values.</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.EmbeddedModelField.empty_strings_allowed">
<code class="descname">empty_strings_allowed</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.EmbeddedModelField.empty_strings_allowed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.EmbeddedModelField.formfield">
<code class="descname">formfield</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmbeddedModelField.formfield" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a django.forms.Field instance for this field.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.EmbeddedModelField.from_db_value">
<code class="descname">from_db_value</code><span class="sig-paren">(</span><em>value</em>, <em>expression</em>, <em>connection</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmbeddedModelField.from_db_value" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="djongo.models.EmbeddedModelField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection=None</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmbeddedModelField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.EmbeddedModelField.pre_save">
<code class="descname">pre_save</code><span class="sig-paren">(</span><em>model_instance</em>, <em>add</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmbeddedModelField.pre_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value just before saving.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.EmbeddedModelField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.EmbeddedModelField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Overrides Django’s default to_python to allow correct
translation to instance.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ArrayReferenceField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ArrayReferenceField</code><span class="sig-paren">(</span><em>to</em>, <em>on_delete=None</em>, <em>related_name=None</em>, <em>related_query_name=None</em>, <em>limit_choices_to=None</em>, <em>parent_link=False</em>, <em>to_field=None</em>, <em>db_constraint=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayReferenceField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.related.ForeignKey</span></code></p>
<p>When the entry gets saved, only a reference to the primary_key of the model is saved in the array.
For all practical aspects, the ArrayReferenceField behaves like a Django ManyToManyField.</p>
<dl class="attribute">
<dt id="djongo.models.ArrayReferenceField.forward_related_accessor_class">
<code class="descname">forward_related_accessor_class</code><a class="headerlink" href="#djongo.models.ArrayReferenceField.forward_related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">ArrayReferenceDescriptor</span></code></p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ArrayReferenceField.get_db_prep_save">
<code class="descname">get_db_prep_save</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayReferenceField.get_db_prep_save" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for saving into a database.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ArrayReferenceField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ArrayReferenceField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="attribute">
<dt id="djongo.models.ArrayReferenceField.many_to_many">
<code class="descname">many_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ArrayReferenceField.many_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ArrayReferenceField.many_to_one">
<code class="descname">many_to_one</code><em class="property"> = True</em><a class="headerlink" href="#djongo.models.ArrayReferenceField.many_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ArrayReferenceField.one_to_many">
<code class="descname">one_to_many</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ArrayReferenceField.one_to_many" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ArrayReferenceField.one_to_one">
<code class="descname">one_to_one</code><em class="property"> = False</em><a class="headerlink" href="#djongo.models.ArrayReferenceField.one_to_one" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="djongo.models.ArrayReferenceField.related_accessor_class">
<code class="descname">related_accessor_class</code><a class="headerlink" href="#djongo.models.ArrayReferenceField.related_accessor_class" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">ReverseArrayReferenceDescriptor</span></code></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="djongo.models.ObjectIdField">
<em class="property">class </em><code class="descclassname">djongo.models.</code><code class="descname">ObjectIdField</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ObjectIdField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.db.models.fields.AutoField</span></code></p>
<p>For every document inserted into a collection MongoDB internally creates an field.
The field can be referenced from within the Model as _id.</p>
<dl class="method">
<dt id="djongo.models.ObjectIdField.get_db_prep_value">
<code class="descname">get_db_prep_value</code><span class="sig-paren">(</span><em>value</em>, <em>connection</em>, <em>prepared=False</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ObjectIdField.get_db_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return field’s value prepared for interacting with the database backend.</p>
<p>Used by the default implementations of get_db_prep_save().</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ObjectIdField.get_prep_value">
<code class="descname">get_prep_value</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ObjectIdField.get_prep_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform preliminary non-db specific value checks and conversions.</p>
</dd></dl>

<dl class="method">
<dt id="djongo.models.ObjectIdField.to_python">
<code class="descname">to_python</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#djongo.models.ObjectIdField.to_python" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert the input value into the expected Python data type, raising
django.core.exceptions.ValidationError if the data can’t be converted.
Return the converted value. Subclasses should override this.</p>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">djongo.models package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-djongo.models.fields">djongo.models.fields module</a></li>
<li><a class="reference internal" href="#module-djongo.models">Module contents</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../">Documentation overview</a><ul>
  <li><a href="../djongo/">djongo package</a><ul>
      <li>Previous: <a href="../djongo.dynamic_formsets.templatetags/" title="previous chapter">djongo.dynamic_formsets.templatetags package</a></li>
      <li>Next: <a href="../djongo.sql2mongo/" title="next chapter">djongo.sql2mongo package</a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/djongo.models.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search/" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2018, nesdis.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.2</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
      
      |
      <a href="../_sources/djongo.models.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>